From: R. Steve McKown Date: Thu, 8 Dec 2011 02:45:02 +0000 (-0700) Subject: char defaults to unsigned X-Git-Tag: 1.0~42 X-Git-Url: https://oss.titaniummirror.com/gitweb?p=rgblamp.git;a=commitdiff_plain;h=d4a9d87f2396d59c36cfdff81ff651bd0c40dff0 char defaults to unsigned Signed char variables must be marked as such, per the Hi-Tech C manual, section 3.3.4: If the signed or unsigned keyword is absent from the (char) variable's definition, the default type is unsigned char. --- diff --git a/main.c b/main.c index 602e7aa..9754ea0 100644 --- a/main.c +++ b/main.c @@ -61,7 +61,7 @@ do { \ typedef struct { int value; int increment; - char remainder; + signed char remainder; } led_t; #define INIT_LED { 0, 0, 0 }