Optimizer warning and error messages – Zilog Z8F0130 User Manual
Page 297

UM013037-1212
Optimizer Warning and Error Messages
Zilog Developer Studio II – Z8 Encore!
User Manual
273
There are multiple string placement directives in a string constant that attempt to
direct the placement of the string in different address spaces.
Optimizer Warning and Error Messages
250 Missing format parameter to (s)printf
This message is generated when a call to printf or sprintf is missing the format param-
eter and the inline generation of printf calls is requested.
For example, a call of the form:
printf();
251 Can't preprocess format to (s)printf
This message is generated when the format parameter to printf or sprintf is not a string
literal and the inline generation of printf calls is requested.
For example, the following code causes this warning:
static char msg1 = "x = %4d";
char buff[sizeof(msg1)+4];
sprintf(buff,msg1,x); // WARNING HERE
This warning is generated because the line of code is processed by the real printf or
sprintf function, so that the primary goal of the inline processing, reducing the code
size by removing these functions, is not met.
When this message is displayed, you have three options:
–
Deselect the
Generate Printfs Inline
checkbox (see the
tion on page 82) so that all calls to
printf
and
sprintf
are handled by the real
printf
or
sprintf
functions.
–
Recode to pass a string literal.
–
For example, the code in the example can be revised as:
define MSG1 "x = %4d"
char buff[sizeof(MSG1)+4];
sprintf(buff,MSG1,x); // OK
–
Keep the
Generate Printfs Inline
checkbox selected and ignore the warning. This
loses the primary goal of the option but results in the faster execution of the calls
to printf or sprintf that can be processed at compile time, a secondary goal of the
option.
252 Bad format string passed to (s)printf
This warning occurs when the compiler is unable to parse the string literal format and
the inline generation of
printf
calls is requested. A normal call to
printf
or
sprintf
is generated (which might also be unable to parse the format).
253 Too few parameters for (s)printf format
- Z8F0131 Z8F0230 Z8F0231 Z8F0430 Z8F0431 Z8F043A Z8F0830 Z8F0831 Z8F083A Z8F1232 Z8F1233 Z8F0113 Z8F011A Z8F0123 Z8F012A Z8F0213 Z8F021A Z8F0223 Z8F022A Z8F0411 Z8F0412 Z8F0413 Z8F041A Z8F0421 Z8F0422 Z8F0423 Z8F042A Z8F0811 Z8F0812 Z8F0813 Z8F081A Z8F0821 Z8F0822 Z8F0823 Z8F082A Z8F0880 Z8F1621 Z8F1622 Z8F1680 Z8F1681 Z8F1682 Z8F2421 Z8F2422 Z8F2480 Z8F3221 Z8F3222 Z8F3281 Z8F3282 Z8F4821 Z8F4822 Z8F4823 Z8F6081 Z8F6082 Z8F6421 Z8F6422 Z8F6423 Z8F6481 Z8F6482 Z8FS021A ZMOT1AHH Z8FS040B ZMOT0BHH ZMOT0BSB Z8FMC04 Z8FMC08 Z8FMC16