Error: EVALUATION_ORDER:
agree that there is a problem.
moreover, it deals with an undocumented command line argument (but sami has documentation addition pending)
- a deference was added in line with intent, hopefully avoids this warning
+ the logic was altered in line with intent, hopefully avoids this warning
my_category: defect_was_fixed
pmap.c:314: write_write_order: In "arg2 = (arg2 ? arg2++ : arg1)", "arg2" is written in "arg2" (the assignment left-hand side) and written in "arg2 ? arg2++ : arg1" but the order in which the side effects take place is undefined because there is no intervening sequence point.
char *arg2 = strchr(arg1,',');
if(arg2)
*arg2 = '\0';
- arg2 = *arg2 ? arg2++ : arg1;
+ if(arg2) ++arg2;
+ else arg2 = arg1;
if(*arg1)
range_low = STRTOUKL(arg1,&arg1,16);
if(*arg2)
range_high = STRTOUKL(arg2,&arg2,16);
if(*arg1 || *arg2)
- usage();
+ usage();
}
break;
case 'a': // Sun prints anon/swap reservations