proc: Silence warning of unhandled fgets() return value

Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
Thomas Graf 2014-08-24 22:11:02 +02:00
parent cce438bef3
commit 584ef44252

View File

@ -101,15 +101,15 @@ static void proc_read(void)
{
struct element *e;
FILE *fd;
char buf[512], *p, *s;
char buf[512], *p, *s, *unused;
int w;
if (!(fd = fopen(c_path, "r")))
quit("Unable to open file %s: %s\n", c_path, strerror(errno));
/* Ignore header */
fgets(buf, sizeof(buf), fd);
fgets(buf, sizeof(buf), fd);
unused = fgets(buf, sizeof(buf), fd);
unused = fgets(buf, sizeof(buf), fd);
for (; fgets(buf, sizeof(buf), fd);) {
uint64_t data[NUM_PROC_VALUE][2];