diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/callback.c | 2 | ||||
-rw-r--r-- | src/pacman/pacman.c | 11 | ||||
-rw-r--r-- | src/pacman/util.c | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index ef67ab75..fac16c5e 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -60,7 +60,7 @@ static int prevpercent=0; /* for less progressbar output */ static float get_update_timediff(int first_call) { float retval = 0.0; - static struct timeval last_time = {0}; + static struct timeval last_time = {0, 0}; /* on first call, simply set the last time and return */ if(first_call) { diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 47f16c02..499e3b80 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -21,8 +21,7 @@ #include "config.h" -/* TODO hard to believe all these are needed just for this file */ -#include <stdlib.h> +#include <stdlib.h> /* atoi */ #include <stdio.h> #include <limits.h> #include <getopt.h> @@ -31,10 +30,10 @@ #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> -#include <sys/utsname.h> -#include <libintl.h> -#include <locale.h> -#include <time.h> +#include <sys/utsname.h> /* uname */ +#include <libintl.h> /* bindtextdomain, textdomain */ +#include <locale.h> /* setlocale */ +#include <time.h> /* time_t */ #if defined(PACMAN_DEBUG) && defined(HAVE_MTRACE) #include <mcheck.h> /* debug tracing (mtrace) */ #endif diff --git a/src/pacman/util.c b/src/pacman/util.c index 80a191d9..b2199821 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -162,7 +162,7 @@ void indentprint(const char *str, int indent) while(*p) { if(*p == ' ') { const char *next = NULL; - unsigned int len; + int len; p++; if(p == NULL || *p == ' ') continue; next = strchr(p, ' '); |