2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00

amdgpu: fix clang warnings

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 <rstoyanov@fedoraproject.org>
This commit is contained in:
Radostin Stoyanov
2023-10-01 08:58:59 +01:00
committed by Andrei Vagin
parent f5932572bb
commit 2ff90f01b9

View File

@@ -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);
@@ -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;