Skip to content

Commit

Permalink
amdgpu: fix clang warnings
Browse files Browse the repository at this point in the history
amdgpu_plugin.c:930:6: error: variable 'buffer' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (ret) {
            ^~~
amdgpu_plugin.c:988:8: note: uninitialized use occurs here
        xfree(buffer);

Signed-off-by: Radostin Stoyanov <[email protected]>
  • Loading branch information
rst0git authored and avagin committed Oct 5, 2023
1 parent f593257 commit 2ff90f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/amdgpu/amdgpu_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ void *dump_bo_contents(void *_thread_data)
int num_bos = 0;
int i, ret = 0;
FILE *bo_contents_fp = NULL;
void *buffer;
void *buffer = NULL;
char img_path[40];

pr_info("Thread[0x%x] started\n", thread_data->gpu_id);
Expand Down Expand Up @@ -1004,7 +1004,7 @@ void *restore_bo_contents(void *_thread_data)
uint64_t max_copy_size;
uint32_t major, minor;
FILE *bo_contents_fp = NULL;
void *buffer;
void *buffer = NULL;
char img_path[40];
int num_bos = 0;
int i, ret = 0;
Expand Down

0 comments on commit 2ff90f0

Please sign in to comment.