Workaround for gcc 11 false positive warning

This commit is contained in:
Alexander Pevzner
2021-08-10 22:31:39 +03:00
parent b8d48dc830
commit 53d6db0f3d
+2 -4
View File
@@ -110,10 +110,8 @@ trace_open (const char *device_name)
path = str_append(path, ".log");
t->log = fopen(path, "w");
// work around gcc 11 warning
log_assert(NULL, str_len(path) >= 4);
strcpy(path + str_len(path) - 4, ".tar");
path = str_resize(path, str_len(path) - 4);
path = str_append(path, ".tar");
t->data = fopen(path, "wb");
mem_free(path);