![]() |
![]() |
3611 | ![]() |
||||
![]() | |||||||
| Arithmetic type - Operations | REFERENCE - ISO:C90-6.1.2.5 Types | ||||||
An operand of type 'char' is being compared with a negative value using a relational or equality operator. In the C language there exist 3 distinct char types:
/*PRQA S 2106,2213,3120,3227,3408,3625,3447 ++*/
extern char ch;
extern void foo(void)
{
if (ch == -40) { } /* Message 3611 */
if (ch != -40) { } /* Message 3611 */
if (ch >= -10) { } /* Message 3611 */
if (ch > -10) { } /* Message 3611 */
if (ch <= -10) { } /* Message 3611 */
if (ch < -10) { } /* Message 3611 */
if (ch < 0) { } /* Message 3612 */
if (0 > ch) { } /* Message 3612 */
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |