From: Linus Torvalds Date: Tue, 30 Aug 2011 21:36:34 +0000 (-0700) Subject: Fix stupid mis-initialization of current sample X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=4b3bd4b739bd7a89c5dd972fff726556b219aeb2;p=ext%2Fsubsurface.git 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 --- diff --git a/Makefile b/Makefile index f77a9fa..1a21637 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 bbe1a68..43bf82d 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)