mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 17:36:11 +00:00
fix warn in prime_nv_*: ignoring return value of ‘fgets’
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
bcfc0f1e4b
commit
0bf5fd894c
@ -38,6 +38,8 @@ static int find_and_open_devices(void)
|
||||
char vendor_id[8];
|
||||
int venid;
|
||||
for (i = 0; i < 9; i++) {
|
||||
char *ret;
|
||||
|
||||
sprintf(path, "/sys/class/drm/card%d/device/vendor", i);
|
||||
if (stat(path, &buf))
|
||||
break;
|
||||
@ -46,7 +48,8 @@ static int find_and_open_devices(void)
|
||||
if (!fl)
|
||||
break;
|
||||
|
||||
fgets(vendor_id, 8, fl);
|
||||
ret = fgets(vendor_id, 8, fl);
|
||||
assert(ret);
|
||||
fclose(fl);
|
||||
|
||||
venid = strtoul(vendor_id, NULL, 16);
|
||||
|
@ -46,6 +46,8 @@ static int find_and_open_devices(void)
|
||||
char vendor_id[8];
|
||||
int venid;
|
||||
for (i = 0; i < 9; i++) {
|
||||
char *ret;
|
||||
|
||||
sprintf(path, "/sys/class/drm/card%d/device/vendor", i);
|
||||
if (stat(path, &buf))
|
||||
break;
|
||||
@ -54,7 +56,8 @@ static int find_and_open_devices(void)
|
||||
if (!fl)
|
||||
break;
|
||||
|
||||
fgets(vendor_id, 8, fl);
|
||||
ret = fgets(vendor_id, 8, fl);
|
||||
assert(ret);
|
||||
fclose(fl);
|
||||
|
||||
venid = strtoul(vendor_id, NULL, 16);
|
||||
|
Loading…
x
Reference in New Issue
Block a user