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). The following listing provides an example.

Listing: 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. */

}