Correct type inconsistency in LC_OPT machinery.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 27 Jul 2011 14:56:25 +0000 (16:56 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 27 Jul 2011 16:14:46 +0000 (18:14 +0200)
ir/libcore/lc_opts.c

index b7b0e30..d68318f 100644 (file)
@@ -354,17 +354,17 @@ int lc_opt_std_cb(const char *name, lc_opt_type_t type, void *data, size_t lengt
                case lc_opt_type_bit:
                        integer = va_arg(args, int);
                        if (integer)
-                               *((int *) data) |= length;
+                               *(unsigned*)data |= length;
                        else
-                               *((int *) data) &= ~length;
+                               *(unsigned*)data &= ~length;
                        break;
 
                case lc_opt_type_negbit:
                        integer = va_arg(args, int);
                        if (integer)
-                               *((int *) data) &= ~length;
+                               *(unsigned*)data &= ~length;
                        else
-                               *((int *) data) |= length;
+                               *(unsigned*)data |= length;
                        break;
 
                case lc_opt_type_boolean: