mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
lib: Remove -Wanalyzer-file-leak ignores
These were added for GCC 11. The problem has been fixed in GCC 12.
On macOS (clang) these produced errors like this:
tsk.c:75:32: error: unknown warning group '-Wanalyzer-file-leak', ignored [-Werror,-Wunknown-warning-option]
^
(cherry picked from commit 347e875911)
This commit is contained in:
@@ -380,8 +380,6 @@ write_cache_query_kvm (guestfs_h *g, const struct qemu_data *data,
|
||||
return generic_write_cache (g, filename, data->query_kvm);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wanalyzer-file-leak"
|
||||
static int
|
||||
read_cache_qemu_stat (guestfs_h *g, struct qemu_data *data,
|
||||
const char *filename)
|
||||
@@ -402,10 +400,7 @@ read_cache_qemu_stat (guestfs_h *g, struct qemu_data *data,
|
||||
|
||||
return 1;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wanalyzer-file-leak"
|
||||
static int
|
||||
write_cache_qemu_stat (guestfs_h *g, const struct qemu_data *data,
|
||||
const char *filename)
|
||||
@@ -429,7 +424,6 @@ write_cache_qemu_stat (guestfs_h *g, const struct qemu_data *data,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
/**
|
||||
* Parse the first line of C<qemu_help> into the major and minor
|
||||
|
||||
@@ -71,8 +71,6 @@ guestfs_impl_find_inode (guestfs_h *g, const char *mountable, int64_t inode)
|
||||
return parse_dirent_file (g, tmpfile); /* caller frees */
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wanalyzer-file-leak"
|
||||
/* Parse the file content and return dirents list.
|
||||
* Return a list of tsk_dirent on success, NULL on error.
|
||||
*/
|
||||
@@ -103,7 +101,6 @@ parse_dirent_file (guestfs_h *g, const char *tmpfile)
|
||||
|
||||
return dirents;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
/* Deserialise the file content and populate the dirent list.
|
||||
* Return the number of deserialised dirents, -1 on error.
|
||||
|
||||
@@ -54,8 +54,6 @@ guestfs_impl_yara_scan (guestfs_h *g, const char *path)
|
||||
return parse_yara_detection_file (g, tmpfile); /* caller frees */
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wanalyzer-file-leak"
|
||||
/* Parse the file content and return detections list.
|
||||
* Return a list of yara_detection on success, NULL on error.
|
||||
*/
|
||||
@@ -88,7 +86,6 @@ parse_yara_detection_file (guestfs_h *g, const char *tmpfile)
|
||||
|
||||
return detections;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
/* Deserialise the file content and populate the detection list.
|
||||
* Return the number of deserialised detections, -1 on error.
|
||||
|
||||
Reference in New Issue
Block a user