-
Notifications
You must be signed in to change notification settings - Fork 60
Description
This looks like a logic error in the code but I don't know what the logic should be.
Other callers pass a scanf type string but this one passes NULL.
So generally some type should be passed but it's not clear what it should be.
CC src/drmgr/common.o
In function ‘get_att_prop’,
inlined from ‘get_property’ at src/drmgr/common.c:802:9,
inlined from ‘valid_platform’ at src/drmgr/common.c:1079:7:
src/drmgr/common.c:773:22: error: argument 2 null where non-null expected [-Werror=nonnull]
773 | rc = fscanf(fp, attr_type, (int *)buf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/features.h:503,
from /usr/include/fcntl.h:25,
from src/drmgr/common.c:21:
/usr/include/stdio.h: In function ‘valid_platform’:
/usr/include/stdio.h:440:12: note: in a call to function ‘fscanf’ declared ‘nonnull’
440 | extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
| ^~~~~~~~~~