Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.2.0 Beta1
-
None
-
Linux
-
75ff4069a664117a5301814f7e831c262bb6b3e3
Description
I just ran the static analyser "cppcheck" over the source code
of qttools-opensource-src-5.2.0-beta1
It said
[remotecontrol.cpp:147]: (warning) Storing getc() return value in char variable and then comparing with EOF.
Source code is
while (true) {
char c = getc(stdin);
if (c == EOF || c == '\0')
break;
The test for c against EOF will always fail. Suggest change
data type of c from char to int.
Attachments
For Gerrit Dashboard: QTBUG-34916 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
71669,2 | Assistant/remote control: Use int for return of getc(). | stable | qt/qttools | Status: MERGED | +2 | 0 |