Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Useless Assignment  at pvmfrag.c:171

Categories: LANG.STRUCT.UA
Warning ID: 22.28603
Similar Warnings: 22.28604
Procedure: fr_new
Trace: view
Modified: Thu Nov 26 11:27:03 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/pvmfrag.c
  Enter fr_new
161 struct frag * 
162 fr_new(len) 
163         int len;        /* (max) buffer size or 0 */ 
164 {
165         struct frag *fp;
166  
167         if (!(fp = frag_get_header()))
168                 goto oops;
169  
170         if (len) {      /* slave frag */ 
171                 fp->fr_link = fp->fr_rlink = 0;     /* Useless Assignment */
172                 if (!(fp->fr_dat = fp->fr_buf = da_new(len))) {
173                         frag_put_header(fp);
174                         goto oops;
175                 }
176                 fp->fr_max = len;
177  
178         } else {        /* master */ 
179                 fp->fr_link = fp->fr_rlink = fp;
180                 fp->fr_dat = fp->fr_buf = 0;
181                 fp->fr_max = 0;
182         }
183         fp->fr_len = 0;
184         fp->fr_u.ref = 1;
185         fp->fr_u.dab = 1;
186         fp->fr_u.spr = 0;
187         fp->fr_rip = 0;
188 #ifdef IMA_CSPP 
189         fp->fr_num_unpacked = 0; 
190 #endif 
191 /*
192         pvmlogprintf("fr_new() %d = %lx\n", len, fp);
193 */ 
194         return fp;
195  
196 oops: 
197         pvmlogerror("fr_new() can't get memory\n");
198         pvmbailout(0);
199         return (struct frag*)0;   /* Unreachable Computation (ID: 23.28605) */
200 } 




Change Warning 22.28603 : Useless Assignment

Because they are very similar, this warning shares annotations with warning 22.28604.

Priority:
State:
Finding:
Owner:
Note: