cc-1209 cc: WARNING File = libsmb/clirap2.c, Line = 1573 The controlling expression is constant. PUTSTRING(p, RAP_SMB_PRINT_JOB_L1, 0); ^ cc-1209 cc: WARNING File = libsmb/clirap2.c, Line = 1678 The controlling expression is constant. PUTSTRING(p, RAP_SMB_PRINT_JOB_L1, 0); ^
One note, the PUTSTRINGP macro in this file ends with a semicolon, while the other macros do not. That might be a mistake.
Created attachment 1361 [details] delete semicolon change spacing for consistency
This warning is interesting because the MIPSpro compiler reports this warning only for these two occurances of the PUTSTRING macro, when other macros such as PUTWORD that use the same do {} while(0) construction don't produce any warning. James Peach may be interested in this.
In a test program the MIPSpro compiler does not generate a warning. -Wall will produce a REMARK though, as expected.
Here is the do loop block after being run through the pre-processor: do { push_ascii(p,"WB21BB16B10zWWzDDz"?"WB21BB16B10zWWzDDz":"",0?0:256,1); p = skip_string(p,1); } while(0); And the Warning recreated in a test program: The controlling expression is constant. push_ascii(p,"WB21BB16B10zWWzDDz"?"WB21BB16B10zWWzDDz":"",0?0:256,1); ^
(In reply to comment #5) > Here is the do loop block after being run through the pre-processor: > > do { > push_ascii(p,"WB21BB16B10zWWzDDz"?"WB21BB16B10zWWzDDz":"",0?0:256,1); > p = skip_string(p,1); > } while(0); This is a common enough idiom, that I just turn that warning off. Use -woff 1209 for mipspro. I'm inclined to mark this as WONTFIX.
Fixed in 16483, by using -woff 1209 by default.