]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Fix stupid mis-initialization of current sample
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Aug 2011 21:36:34 +0000 (14:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Aug 2011 21:36:34 +0000 (14:36 -0700)
.. nice compiler warning hidden by the crazy gcc pointer sign warnings
that nobody wants to see (yes, we really do want to do 'strlen()' even
on unsigned strings, don't complain, crazy bitch compiler).

So this also makes our CFLAGS set -Wno-pointer-sign.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Makefile
parse.c

index f77a9faa4a6f66bb1934696edbf56c88f76aecd2..1a2163784e9c189f2d82f8ba41df637f9dc876a7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,5 @@
+CC=gcc
+CFLAGS=-Wall -Wno-pointer-sign -g
+
 parse: parse.c
-       gcc -Wall -g -o parse `xml2-config --cflags` parse.c `xml2-config --libs`
+       $(CC) $(CFLAGS) -o parse `xml2-config --cflags` parse.c `xml2-config --libs`
diff --git a/parse.c b/parse.c
index bbe1a68caaf243fce4c6f45a3c7171410ec30969..43bf82d86a7885469c691a9100ad516ab996f3c0 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -185,7 +185,7 @@ static void sample_start(void)
                if (!dive)
                        return;
        }
-       sample = dive->samples + nr;
+       sample = dive->sample + nr;
 }
 
 static void sample_end(void)