We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c7f5ca7 + c74282c commit cdf6835Copy full SHA for cdf6835
1 file changed
test/testcharvar.cpp
@@ -77,6 +77,14 @@ class TestCharVar : public TestFixture {
77
"}");
78
ASSERT_EQUALS("[test.cpp:5]: (warning) Signed 'char' type used as array index.\n", errout.str());
79
80
+ check("int buf[256];\n"
81
+ "void foo()\n"
82
+ "{\n"
83
+ " signed char ch = 0;\n"
84
+ " buf[ch] = 0;\n"
85
+ "}");
86
+ ASSERT_EQUALS("", errout.str());
87
+
88
check("int buf[256];\n"
89
"void foo(signed char ch)\n"
90
"{\n"
0 commit comments