mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-21 14:56:18 +00:00
fix warn in intel_error_decode: ignoring return value of 'asprintf'
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
6456e75f0d
commit
5efd3d3d22
@ -49,6 +49,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
|
#include <assert.h>
|
||||||
#include <intel_bufmgr.h>
|
#include <intel_bufmgr.h>
|
||||||
|
|
||||||
#include "intel_chipset.h"
|
#include "intel_chipset.h"
|
||||||
@ -479,13 +480,18 @@ main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (S_ISDIR (st.st_mode)) {
|
if (S_ISDIR (st.st_mode)) {
|
||||||
asprintf (&filename, "%s/i915_error_state", path);
|
int ret;
|
||||||
|
|
||||||
|
ret = asprintf (&filename, "%s/i915_error_state", path);
|
||||||
|
assert(ret > 0);
|
||||||
file = fopen(filename, "r");
|
file = fopen(filename, "r");
|
||||||
if (!file) {
|
if (!file) {
|
||||||
int minor;
|
int minor;
|
||||||
for (minor = 0; minor < 64; minor++) {
|
for (minor = 0; minor < 64; minor++) {
|
||||||
free(filename);
|
free(filename);
|
||||||
asprintf(&filename, "%s/%d/i915_error_state", path, minor);
|
ret = asprintf(&filename, "%s/%d/i915_error_state", path, minor);
|
||||||
|
assert(ret > 0);
|
||||||
|
|
||||||
file = fopen(filename, "r");
|
file = fopen(filename, "r");
|
||||||
if (file)
|
if (file)
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user