Project

General

Profile

Actions

Feature #8890

closed

[PATCH] Eliminate less-than-zero checks for unsigned variables

Added by tonyo (Anton Ovchinnikov) over 10 years ago. Updated over 10 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:57117]

Description

According to section 7.17 of C99 standard (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf) size_t is an unsigned type. What do you think about the following patch which changes less-than-zero checks to equal-zero for unsigned (including size_t) variables?

These checks were found with 'cppcheck' static analysis tool.


Files

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0