Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Unreachable Data Flow  at pmsg.c:307

Categories: LANG.STRUCT.UC CWE:561
Warning ID: 2618.2658
Procedure: fbol
Trace: View
Modified: Wed Sep 2 12:42:19 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 fbol
275 fbol(o, p, n) 
276         int o;
277         unsigned char *p;
278         int n;
279 {
280         int i, j;
281  
282         for (i = 0; i < 16; i++) {
283                 if (thesigs[i].length == n) {
284                         for (j = 0; j < n; j++)
285                                 if (p[j] != thesigs[i].bytes[j])
286                                         break;
287                         if (j == n)
288                                 return ((3 << 4) | i) << o;
289  
290                         for (j = 0; j < n; j++)
291                                 if (p[n - 1 - j] != thesigs[i].bytes[j])
292                                         break;
293                         if (j == n)
294                                 return i << o;
295  
296                         /* weird float byte order for Strongarm?! */ 
297                         /*  Alexander Schulz <un23@rz.uni-karlsruhe.de> */ 
298                         for (j = 0; j < n; j++)
299                                 if (p[(((j/4)*8)+3)-j] != thesigs[i].bytes[j])
300                                         break;
301                         if (j == n)
302                                 return ((2 << 4) | i) << o;
303                 }
304         }
305         fprintf(stderr, "can't generate signature for my float byte order\n");
306         abort();
307         return 0;     /* Unreachable Data Flow */
308 




Change Warning 2618.2658 : Unreachable Data Flow

Priority:
State:
Finding:
Owner:
Note: