Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=715118bd2780cdf5b74d3d3d33dfd0837f5e8e0d
commit 715118bd2780cdf5b74d3d3d33dfd0837f5e8e0d Author: crazy <cr...@frugalware.org> Date: Fri Feb 26 08:14:22 2010 +0100 fix warnings found with strict enabled ( part 1 ) diff --git a/lib/libpacman/log.c b/lib/libpacman/log.c index 156a6f8..7e6efdf 100644 --- a/lib/libpacman/log.c +++ b/lib/libpacman/log.c @@ -31,7 +31,7 @@ pacman_cb_log pm_logcb = NULL; unsigned char pm_logmask = 0; -void _pacman_log(unsigned char flag, char *fmt, ...) +void _pacman_log(unsigned char flag, const char *fmt, ...) { if(pm_logcb == NULL) { return; diff --git a/lib/libpacman/log.h b/lib/libpacman/log.h index b9aee3e..d5b1ab9 100644 --- a/lib/libpacman/log.h +++ b/lib/libpacman/log.h @@ -28,7 +28,7 @@ extern pacman_cb_log pm_logcb; extern unsigned char pm_logmask; -void _pacman_log(unsigned char flag, char *fmt, ...); +void _pacman_log(unsigned char flag, const char *fmt, ...); #endif /* _PACMAN_LOG_H */ diff --git a/lib/libpacman/trans.c b/lib/libpacman/trans.c index d04e877..9b13ef9 100644 --- a/lib/libpacman/trans.c +++ b/lib/libpacman/trans.c @@ -40,7 +40,7 @@ #include "cache.h" #include "pacman.h" -static int check_oldcache() +static int check_oldcache(void) { pmdb_t *db = handle->db_local; char lastupdate[16] = ""; diff --git a/lib/libpacman/util.c b/lib/libpacman/util.c index bd24cd3..226b630 100644 --- a/lib/libpacman/util.c +++ b/lib/libpacman/util.c @@ -718,7 +718,7 @@ cleanup: } #ifndef __sun__ -static long long get_freespace() +static long long get_freespace(void) { struct mntent *mnt; char *table = MOUNTED; diff --git a/src/pacman-g2/log.c b/src/pacman-g2/log.c index 0c8fa2f..a13e73c 100644 --- a/src/pacman-g2/log.c +++ b/src/pacman-g2/log.c @@ -89,7 +89,7 @@ void cb_log(unsigned short level, char *msg) /* Wrapper to fprintf() that allows to choose if we want the output * to be appended on the current line, or written to a new one */ -void pm_fprintf(FILE *file, unsigned short line, char *fmt, ...) +void pm_fprintf(FILE *file, unsigned short line, const char *fmt, ...) { va_list args; diff --git a/src/pacman-g2/log.h b/src/pacman-g2/log.h index 3849131..2f2311a 100644 --- a/src/pacman-g2/log.h +++ b/src/pacman-g2/log.h @@ -21,14 +21,14 @@ #ifndef _PM_LOG_H #define _PM_LOG_H -#define MSG(line, fmt, args...) pm_fprintf(stdout, line, fmt, ##args) -#define ERR(line, fmt, args...) do { \ +#define MSG(line, ...) pm_fprintf(stdout, line,## __VA_ARGS__) +#define ERR(line, fmt, ...) do { \ pm_fprintf(stderr, line, _("error: ")); \ - pm_fprintf(stderr, CL, fmt, ##args); \ + pm_fprintf(stderr, CL, fmt,## __VA_ARGS__); \ } while(0) -#define WARN(line, fmt, args...) do { \ +#define WARN(line, fmt, ...) do { \ pm_fprintf(stderr, line, _("warning: ")); \ - pm_fprintf(stderr, CL, fmt, ##args); \ + pm_fprintf(stderr, CL, fmt,## __VA_ARGS__); \ } while(0) enum { @@ -39,7 +39,7 @@ enum { /* callback to handle messages/notifications from libpacman library */ void cb_log(unsigned short level, char *msg); -void pm_fprintf(FILE *file, unsigned short line, char *fmt, ...); +void pm_fprintf(FILE *file, unsigned short line, const char *fmt, ...); void vprint(char *fmt, ...); int yesno(char *fmt, ...); diff --git a/src/versort/versort.c b/src/versort/versort.c index 3bdcce0..df28b35 100644 --- a/src/versort/versort.c +++ b/src/versort/versort.c @@ -91,7 +91,7 @@ static void readfd(int fd) #define STATUS_MARK 0 #define STATUS_SEARCH 1 -static void makeindex() +static void makeindex(void) { size_t tmp_index = 0; int status = STATUS_MARK; _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git