[cppcheck-fix][use-char-as-array-index]

This commit is contained in:
tpaviot
2011-08-08 12:52:26 +02:00
parent f7b9cfa416
commit 512968ee81
+4 -3
View File
@@ -59,7 +59,8 @@ OBJinitialize()
void
OBJcreate(char type,struct Symbol_ *(*get_symbol)(Generic),char *printable_type,int bits)
{
OBJ[type].get_symbol = get_symbol;
OBJ[type].type = printable_type;
OBJ[type].bits = bits;
unsigned index = (unsigned)type;
OBJ[index].get_symbol = get_symbol;
OBJ[index].type = printable_type;
OBJ[index].bits = bits;
}