Bugzilla – Bug 233328
torcs-1.3.0-17: comparison with string literal
Last modified: 2007-01-11 15:56:09 UTC
I just tried to compile package torcs-1.3.0-17 The compiler said driverconfig.cpp:584: warning: comparison with string literal The source code is if (curPlayer->transmission != HM_VAL_AUTO) { but find ../BUILD/torcs-1.3.0/ -name \*.h -print | xargs fgrep HM_VAL_AUTO ../BUILD/torcs-1.3.0/src/interfaces/playerpref.h:#define HM_VAL_AUTO "auto" ../BUILD/torcs-1.3.0/export/include/playerpref.h:#define HM_VAL_AUTO "auto" I agree with the compiler. Suggest new code if (strcmp( curPlayer->transmission, HM_VAL_AUTO) != 0) {
What is the gcc compiler switch to trigger this warning?
(In reply to comment #1) > What is the gcc compiler switch to trigger this warning? I'm not sure of the individual switch, but I know -Wall will do it. Suggest also try "man gcc".
*** This bug has been marked as a duplicate of bug 233655 ***