[GRASS-dev] d.linegraph indentation mess
Markus Neteler
neteler at osgeo.org
Sat Dec 17 04:15:35 PST 2016
Hi,
by chance I saw come compiler warning:
make[1]: Entering directory '/home/neteler/software/grass73/display/d.linegraph'
gcc -g -Wall -Wshadow -Wlogical-op
-Werror-implicit-function-declaration -fPIC -fno-common -fexceptions
-Wextra -Wunused -Wreturn-type -Wfatal-errors -march=native -std=gnu99
-fexceptions -fstack-protector -m64 -fdiagnostics-color
-I/home/neteler/software/grass73/dist.x86_64-pc-linux-gnu/include
-I/home/neteler/software/grass73/dist.x86_64-pc-linux-gnu/include
-DPACKAGE=\""grassmods"\"
-I/home/neteler/software/grass73/dist.x86_64-pc-linux-gnu/include
-I/home/neteler/software/grass73/dist.x86_64-pc-linux-gnu/include
-DRELDIR=\"display/d.linegraph\" -o OBJ.x86_64-pc-linux-gnu/main.o -c
main.c
main.c: In function ‘main’:
main.c:396:16: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
for (j = 0; j < strlen(title[i]->answer); j++)
^
main.c:526:16: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
for (i = 0; i <= (strlen(y_color_opt->answer)); i++) {
^~
main.c:528:6: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
(i == (strlen(y_color_opt->answer)))) {
^~
main.c:735:5: warning: this ‘if’ clause does not guard...
[-Wmisleading-indentation]
if (scale_x_values)
^~
main.c:739:2: note: ...this statement, but the latter is misleadingly
indented as if it is guarded by the ‘if’
if ((err != 1) || (err == EOF)) {
^~
Indeed, the if() statement in 735 has some issues: braces missing or
indentation wrong.
Any idea how to fix that correctly?
Markus
More information about the grass-dev
mailing list