summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-08-30 14:36:34 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-08-30 14:36:34 -0700
commit4b3bd4b739bd7a89c5dd972fff726556b219aeb2 (patch)
tree2df4cf8efa518c1607e4d7961f44003937ffcd2a
parent414565e000d24fe8b483294fbec64539e336bb4e (diff)
downloadsubsurface-4b3bd4b739bd7a89c5dd972fff726556b219aeb2.tar.gz
Fix stupid mis-initialization of current sample
.. 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>
-rw-r--r--Makefile5
-rw-r--r--parse.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f77a9faa4..1a2163784 100644
--- 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 bbe1a68ca..43bf82d86 100644
--- 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)