warn_ptr_int_conv. NXP CodeWarrior Development Studio
விளம்பரம்
விளம்பரம்
Chapter 31 Pragmas for Diagnostic Messages
i = sockcount(); while (--i); /* WARNING: empty loop. */
matchsock(i);
If you intended to create an infinite loop, put white space or a comment between the while statement and the semicolon. The statements in the listing below, suppress the above error or warning messages.
Listing 31-21. Intentional empty statements
while (i++) ; /* OK: White space separation. */ while (i++) /* OK: Comment separation */ ;
By default, this pragma is off
.
31.30 warn_ptr_int_conv
Controls the recognition the conversion of pointer values to incorrectly-sized integral values.
Syntax
#pragma warn_ptr_int_conv on | off | reset
Remarks
If you enable this pragma, the compiler issues a warning message if an expression attempts to convert a pointer value to an integral type that is not large enough to hold the pointer value.
Listing 31-22. Example for #pragma warn_ptr_int_conv
#pragma warn_ptr_int_conv on char *my_ptr; char too_small = (char)my_ptr; /* WARNING: char is too small. */
See also
"warn_any_ptr_int_conv" on page 231
.
By default, this pragma is off.
31.31 warn_resultnotused
Controls the issuing of warning messages when function results are ignored.
Syntax
CodeWarrior Development Studio for Advanced Packet Processing Build Tools Reference Manual, Rev.
10.2, 01/2016
Freescale Semiconductor, Inc.
497
பதிவிறக்கு
விளம்பரம்