mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 10:26:12 +00:00
tools/intel_error_decode: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
7ee9f16e51
commit
391e6aa89a
@ -285,7 +285,7 @@ read_data_file (FILE *file)
|
|||||||
size_t line_size;
|
size_t line_size;
|
||||||
uint32_t offset, value;
|
uint32_t offset, value;
|
||||||
uint32_t gtt_offset = 0, new_gtt_offset;
|
uint32_t gtt_offset = 0, new_gtt_offset;
|
||||||
char *buffer_type[2] = { "ringbuffer", "batchbuffer" };
|
const char *buffer_type[2] = { "ringbuffer", "batchbuffer" };
|
||||||
char *ring_name = NULL;
|
char *ring_name = NULL;
|
||||||
int is_batch = 1;
|
int is_batch = 1;
|
||||||
|
|
||||||
@ -430,7 +430,7 @@ main (int argc, char *argv[])
|
|||||||
const char *path;
|
const char *path;
|
||||||
char *filename;
|
char *filename;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int err;
|
int error;
|
||||||
|
|
||||||
if (argc > 2) {
|
if (argc > 2) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
@ -451,11 +451,11 @@ main (int argc, char *argv[])
|
|||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
if (isatty(0)) {
|
if (isatty(0)) {
|
||||||
path = "/debug/dri";
|
path = "/debug/dri";
|
||||||
err = stat (path, &st);
|
error = stat (path, &st);
|
||||||
if (err != 0) {
|
if (error != 0) {
|
||||||
path = "/sys/kernel/debug/dri";
|
path = "/sys/kernel/debug/dri";
|
||||||
err = stat (path, &st);
|
error = stat (path, &st);
|
||||||
if (err != 0) {
|
if (error != 0) {
|
||||||
errx(1,
|
errx(1,
|
||||||
"Couldn't find i915 debugfs directory.\n\n"
|
"Couldn't find i915 debugfs directory.\n\n"
|
||||||
"Is debugfs mounted? You might try mounting it with a command such as:\n\n"
|
"Is debugfs mounted? You might try mounting it with a command such as:\n\n"
|
||||||
@ -468,8 +468,8 @@ main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
path = argv[1];
|
path = argv[1];
|
||||||
err = stat (path, &st);
|
error = stat (path, &st);
|
||||||
if (err != 0) {
|
if (error != 0) {
|
||||||
fprintf (stderr, "Error opening %s: %s\n",
|
fprintf (stderr, "Error opening %s: %s\n",
|
||||||
path, strerror (errno));
|
path, strerror (errno));
|
||||||
exit (1);
|
exit (1);
|
||||||
@ -495,11 +495,10 @@ main (int argc, char *argv[])
|
|||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
filename = (char *) path;
|
file = fopen(path, "r");
|
||||||
file = fopen(filename, "r");
|
|
||||||
if (!file) {
|
if (!file) {
|
||||||
fprintf (stderr, "Failed to open %s: %s\n",
|
fprintf (stderr, "Failed to open %s: %s\n",
|
||||||
filename, strerror (errno));
|
path, strerror (errno));
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user