aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgonzo <gonzo@toniatuh.com>2023-02-06 10:09:23 +0100
committergonzo <gonzo@toniatuh.com>2023-02-06 10:09:23 +0100
commit44854f3381e6205ede8fe41b4885b36cea7bee6d (patch)
treeb569d05c5d177b643f993e7ef063c6ff963c2b4f
parent320c331b84a6ac4743fcd94c27a20c1b73a513ab (diff)
downloadorg-to-conky-44854f3381e6205ede8fe41b4885b36cea7bee6d.tar.gz
fixing even more stuff(uninitialized pointers, switch to clang)
-rw-r--r--GNUmakefile2
-rw-r--r--date.c2
-rw-r--r--main.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index f6c86cf..86e504a 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,4 +1,4 @@
-CC=gcc
+CC=clang
CFLAGS=-Wall -Wextra -Werror -Wpadded -pedantic
LIBS=
diff --git a/date.c b/date.c
index 155463b..ebee121 100644
--- a/date.c
+++ b/date.c
@@ -119,7 +119,7 @@ char *short_date_to_string(Date date) {
return ret;
}
-Date today() {
+Date today(void) {
Date ret;
time_t tm;
struct tm localtm;
diff --git a/main.c b/main.c
index 61602ec..166dbd7 100644
--- a/main.c
+++ b/main.c
@@ -10,7 +10,7 @@ static char *read_file_to_buffer(char *filename) {
size_t bufsize = BS;
size_t bufread = 0;
char *buf = (char *)malloc(bufsize);
- char *newbuf;
+ char *newbuf = NULL;
while (read(fd, buf + bufread, BS) == BS) {
newbuf = (char *)malloc(bufsize + BS);