Package: xbattbar Version: 1.4.4-1 Hello,
Attached is a patch fixing some compilation warnings in APM backend. -- Cheers, Andrew
Subject: Fix some compilation warnings. From: Andrew Shadura <andre...@debian.org> --- a/xbattbar-check-apm.c +++ b/xbattbar-check-apm.c @@ -22,6 +22,7 @@ #include <stdio.h> #include <unistd.h> +#include <string.h> static int ac_line = -1; /* AC line status */ static int battery_level = -1; /* battery level */ @@ -236,10 +237,13 @@ void battery_check(void) _exit(1); } - fgets( buf, sizeof( buf ) - 1, pt ); + if (fgets(buf, sizeof(buf) - 1, pt) == NULL) { + fprintf(stderr, "xbattbar: Can't read proc info: %s\n", strerror(errno)); + _exit(1); + } buf[ sizeof( buf ) - 1 ] = '\0'; sscanf( buf, "%s %d.%d %x %x %x %x %d%% %d %d\n", - &i.driver_version, + &i.driver_version[0], &i.apm_version_major, &i.apm_version_minor, &i.apm_flags,
signature.asc
Description: PGP signature