Jelajahi Sumber

fixed compiler warnings in a better way

Ali H. Fardan 9 tahun lalu
induk
melakukan
6f31ca6ce3
2 mengubah file dengan 1 tambahan dan 11 penghapusan
  1. 1 1
      config.mk
  2. 0 10
      slstatus.c

+ 1 - 1
config.mk

@@ -16,7 +16,7 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lasound
 
 # flags
 CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE
-CFLAGS = -std=c99 -pedantic -Wall -Wextra -O0 ${INCS} ${CPPFLAGS}
+CFLAGS = -std=c99 -pedantic -Wno-unused-function -Wall -Wextra -O0 ${INCS} ${CPPFLAGS}
 #CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
 LDFLAGS = ${LIBS}
 #LDFLAGS = -s ${LIBS}

+ 0 - 10
slstatus.c

@@ -611,16 +611,6 @@ main(void)
 	char *res, *element;
 	struct arg argument;
 
-	/* get rid of unused functions warning */
-	if (0) { setstatus(""); battery_perc(""); cpu_perc();
-		datetime(""); disk_free(""); disk_perc("");
-		disk_total(""); disk_used(""); entropy();
-		gid(); hostname(); ip(""); load_avg();
-		ram_free(); ram_perc(); ram_used(); ram_total();
-		run_command(""); temp(""); uid(); uptime();
-		username(); vol_perc(""); wifi_perc("");
-		wifi_essid(""); }
-
 	if (!(dpy = XOpenDisplay(0x0))) {
 		fprintf(stderr, "Cannot open display!\n");
 		exit(1);