Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Useless Assignment  at pmsg.c:452

Categories: LANG.STRUCT.UA
Warning ID: 2433.2461
Similar Warnings: 2433.2460
Procedure: pmsg_new
Trace: View
Modified: Wed Sep 2 12:39:29 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
  /u1/paul/SATE/2010/c/pvm/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: 2434.2462) */
454                         PVM_FREE(mp);   /* Unreachable Call (ID: 2435.2463) */
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 2433.2461 : Useless Assignment

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