Resolve compiler warnings and udpate CFLAGS

This commit is contained in:
Night Kaly 2024-11-04 23:37:37 +00:00
parent bda666fb4f
commit a26a5bcc3a
Signed by: night0721
SSH key fingerprint: SHA256:B/hgVwUoBpx5vdNsXl9w8XwZljA9766uk6T4ubZp5HM
2 changed files with 5 additions and 5 deletions

View file

@ -9,7 +9,7 @@ BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man/man1
LDFLAGS != pkg-config --libs libcurl
CFLAGS = -O3 -march=native -mtune=native -pipe -s -std=c99 -pedantic -Wall
CFLAGS = -Os -march=native -mtune=native -pipe -s -std=c99 -pedantic -Wall -D_DEFAULT_SOURCE
SRC = bob.c

8
bob.c
View file

@ -1,10 +1,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <limits.h>
#include <errno.h>
#include <sys/stat.h>
#include <linux/limits.h>
#include <curl/curl.h>
@ -37,7 +37,7 @@ size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream)
return written;
}
char *get_db_path()
char *get_db_path(void)
{
char *db_path = malloc(12);
if (db_path == NULL) {
@ -229,7 +229,7 @@ void update_package(char *pkg)
}
}
char **search_index()
char **search_index(void)
{
long response_code;
char temp_path[] = "/tmp/bob_index";