1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

Small improvement to avoid lib/kernel/kernel.c:195:3: error: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Werror=unused-result] error on Ubuntu...not a hard requirement

This commit is contained in:
Umar Farooq 2016-10-10 23:09:09 +02:00
parent 59af01cc33
commit deba073407

View file

@ -184,6 +184,7 @@ int kernel_irq_setaffinity(unsigned irq, uintmax_t new, uintmax_t *old)
{
char fn[64];
FILE *f;
int ret = 0;
snprintf(fn, sizeof(fn), "/proc/irq/%u/smp_affinity", irq);
@ -192,10 +193,10 @@ int kernel_irq_setaffinity(unsigned irq, uintmax_t new, uintmax_t *old)
return -1; /* IRQ does not exist */
if (old)
fscanf(f, "%jx", old);
ret = fscanf(f, "%jx", old);
fprintf(f, "%jx", new);
fclose(f);
return 0;
return ret;
}