]> oss.titaniummirror.com Git - rgblamp.git/commitdiff
char defaults to unsigned
authorR. Steve McKown <rsmckown@gmail.com>
Thu, 8 Dec 2011 02:45:02 +0000 (19:45 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Thu, 8 Dec 2011 02:45:02 +0000 (19:45 -0700)
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.

main.c

diff --git a/main.c b/main.c
index 602e7aa81ad70594ad9addfb20c64138c2be8233..9754ea06851d01160d1e7cf2ac45121d72e15fb4 100644 (file)
--- 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 }