https://bugzilla.novell.com/show_bug.cgi?id=211295 Summary: alsa-tools-1.0.13-3: dodgy code Product: openSUSE 10.2 Version: Alpha 5 Platform: All OS/Version: SuSE Linux 10.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de I just tried to compile package alsa-tools-1.0.13-3 with the GNU C compiler. The compiler said profiles.c:74: warning: comparison with string literal profiles.c:74: warning: comparison with string literal profiles.c:76: warning: comparison with string literal The source code is if ((*cfgfile != DEFAULT_PROFILERC) && (*cfgfile != SYS_PROFILERC)) { res = -ENOENT; } else if ((*cfgfile == DEFAULT_PROFILERC) && ((inputFile = fopen(SYS_PROFILERC, "r")) == NULL)) { and linux:/usr/src/packages/SPECS # find ../BUILD/alsa-tools-1.0.13rc2/ -name \*.h -print | xargs fgrep DEFAULT_PROFILERC ./BUILD/alsa-tools-1.0.13rc2/envy24control/envy24control.h:#define DEFAULT_PROFILERC "~/envy24control/profiles.conf" ./BUILD/alsa-tools-1.0.13rc2/envy24control/profiles.h:#ifndef DEFAULT_PROFILERC ./BUILD/alsa-tools-1.0.13rc2/envy24control/profiles.h:#define DEFAULT_PROFILERC "~/"PROGRAM_NAME"/profiles.conf" linux:/usr/src/packages/SPECS # I agree with the compiler. Suggest code rework, maybe use strcmp instead. if (strcmp( *cfgfile, DEFAULT_PROFILERC) && strcmp( *cfgfile, SYS_PROFILERC)) { res = -ENOENT; } else if ((strcmp( *cfgfile, DEFAULT_PROFILERC) == 0) && ((inputFile = fopen(SYS_PROFILERC, "r")) == NULL)) { -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.