Xinqi Bao's Git
projects
/
slstatus.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
8e039b9
)
fixed compiler warnings in a better way
author
Ali H. Fardan <
[email protected]
>
Sun, 21 Aug 2016 12:43:57 +0000
(15:43 +0300)
committer
Ali H. Fardan <
[email protected]
>
Sun, 21 Aug 2016 12:43:57 +0000
(15:43 +0300)
config.mk
diff
|
blob
|
history
slstatus.c
diff
|
blob
|
history
diff --git
a/config.mk
b/config.mk
index
f01bcdb
..
8e404d6
100644
(file)
--- a/
config.mk
+++ b/
config.mk
@@
-16,7
+16,7
@@
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lasound
# flags
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE
# flags
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE
-CFLAGS = -std=c99 -pedantic -Wall -Wextra -O0 ${INCS} ${CPPFLAGS}
+CFLAGS = -std=c99 -pedantic -W
no-unused-function -W
all -Wextra -O0 ${INCS} ${CPPFLAGS}
#CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = ${LIBS}
#LDFLAGS = -s ${LIBS}
#CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = ${LIBS}
#LDFLAGS = -s ${LIBS}
diff --git
a/slstatus.c
b/slstatus.c
index
b0e3eef
..
7bd3b8c
100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-611,16
+611,6
@@
main(void)
char *res, *element;
struct arg argument;
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);
if (!(dpy = XOpenDisplay(0x0))) {
fprintf(stderr, "Cannot open display!\n");
exit(1);