From: Mikko Rasa Date: Sun, 16 Nov 2014 16:12:50 +0000 (+0200) Subject: Enable strict standards conformance and fix resulting errors X-Git-Url: http://git.tdb.fi/?p=pmount-gui.git;a=commitdiff_plain;h=a82201f388e8d4b4b5b10b9547c3ee3a4e488586;hp=0bf882489848c7f19eb602e286d760c709685251 Enable strict standards conformance and fix resulting errors --- diff --git a/Makefile b/Makefile index dd03d7c..1632770 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,2 @@ pmount-gui: main.c - $(CC) -Wall -Wextra -o $@ $^ $(shell pkg-config --cflags --libs gtk+-2.0) + $(CC) -Wall -Wextra -std=c90 -pedantic -o $@ $^ $(shell pkg-config --cflags --libs gtk+-2.0) diff --git a/main.c b/main.c index 916c2e2..6392130 100644 --- a/main.c +++ b/main.c @@ -1,3 +1,5 @@ +/* Required for strdup, snprintf, getopt */ +#define _XOPEN_SOURCE 500 #include #include #include @@ -7,6 +9,7 @@ #include #include #include +#include #include #include @@ -427,10 +430,12 @@ Device *get_devices(void) for(i=0; nodes[i]; ++i) { + Property *props; + if(verbosity>=1) printf("Examining device %s\n", nodes[i]); - Property *props = get_device_properties(nodes[i]); + props = get_device_properties(nodes[i]); if(!props) { if(verbosity>=2)