warn_no_side_effect. NXP CodeWarrior Development Studio
जाहिरात
जाहिरात
warn_no_side_effect
int func()
{
/* WARNING: no return statement. */
}
31.26 warn_no_side_effect
Controls the issuing of warning messages for redundant statements.
Syntax
#pragma warn_no_side_effect on | off | reset
Remarks
If you enable this pragma, the compiler issues a warning message when it encounters a statement that produces no side effect. To suppress this warning message, cast the statement with
(void)
.
provides an example.
Listing 31-17. Example of Pragma warn_no_side_effect
#pragma warn_no_side_effect on void func(int a,int b)
{
a+b; /* WARNING: expression has no side effect */
(void)(a+b); /* OK: void cast suppresses warning. */
}
By default, this pragma is off
.
31.27 warn_padding
Controls the issuing of warning messages for data structure padding.
Syntax
#pragma warn_padding on | off | reset
Remarks
If you enable this pragma, the compiler warns about any bytes that were implicitly added after an ANSI C struct
member to improve memory alignment. Refer to the appropriate
Targeting
manual for more information on how the compiler pads data structures for a particular processor or operating system.
By default, this setting is off
.
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
482 Freescale Semiconductor, Inc.
डाउनलोड
जाहिरात