Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Useless Assignment  at pmsg.c:452

Categories: LANG.STRUCT.UA
Warning ID: 24.28607
Similar Warnings: 24.28606
Procedure: pmsg_new
Trace: view
Modified: Thu Nov 26 11:27:04 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
LineSource
  /kat0/fletcher/SATE/2010/pvm3/src/pmsg.c
  Enter pmsg_new
438 struct pmsg * 
439 pmsg_new(master) 
440         int master;                     /* true if a master (no data) node */ 
441 {
442         struct pmsg *mp;
443  
444         if (!(mp = pmsg_get()))
445                 goto fail;
446  
447         mp->m_ref = 1;
448         if (master) {
449                 mp->m_link = mp->m_rlink = mp;
450                 mp->m_frag = 0;
451         } else {
452                 mp->m_link = mp->m_rlink = 0;     /* Useless Assignment */
453                 if (!(mp->m_frag = fr_new(0))) {   /* Redundant Condition (ID: 25.28608) */
454                         PVM_FREE(mp);   /* Unreachable Call (ID: 26.28609) */
455                         goto fail;
456                 }
457         }
458         mp->m_codef = 0;
459         mp->m_cfrag = 0;
460         mp->m_mid = 0;
461         mp->m_len = 0;
462         mp->m_ctx = 0;
463         mp->m_tag = 0;
464         mp->m_wid = 0;
465         mp->m_src = 0;
466         mp->m_dst = 0;
467         mp->m_enc = 0;
468         mp->m_flag = 0;
469         mp->m_cpos = 0;
470         mp->m_crc = 0;
471         return mp;
472  
473 fail: 
474         return (struct pmsg *)0;
475 } 




Change Warning 24.28607 : Useless Assignment

Because they are very similar, this warning shares annotations with warning 24.28606.
CodeSonar has selected warning 24.28606 to represent this group of similar warnings. In order to edit this group, you must edit warning 24.28606.