diff options
author | Ian Lance Taylor <iant@golang.org> | 2023-06-26 09:57:21 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2023-06-26 09:57:21 -0700 |
commit | aa1e672b5d99102b03eb5fb9c51609c45f62bff7 (patch) | |
tree | 886212591b1c9d127eaaf234a4a2e22452ea384a /gcc/analyzer/sm-malloc.cc | |
parent | 97e31a0a2a2d2273687fcdb4e5416aab1a2186e1 (diff) | |
parent | 3a39a31b8ae9c6465434aefa657f7fcc86f905c0 (diff) | |
download | gcc-devel/gccgo.zip gcc-devel/gccgo.tar.gz gcc-devel/gccgo.tar.bz2 |
Merge from trunk revision 3a39a31b8ae9c6465434aefa657f7fcc86f905c0.devel/gccgo
Diffstat (limited to 'gcc/analyzer/sm-malloc.cc')
-rw-r--r-- | gcc/analyzer/sm-malloc.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/analyzer/sm-malloc.cc b/gcc/analyzer/sm-malloc.cc index 7470137..a8c63eb 100644 --- a/gcc/analyzer/sm-malloc.cc +++ b/gcc/analyzer/sm-malloc.cc @@ -835,7 +835,7 @@ public: return OPT_Wanalyzer_mismatching_deallocation; } - bool emit (rich_location *rich_loc) final override + bool emit (rich_location *rich_loc, logger *) final override { auto_diagnostic_group d; diagnostic_metadata m; @@ -914,7 +914,7 @@ public: return OPT_Wanalyzer_double_free; } - bool emit (rich_location *rich_loc) final override + bool emit (rich_location *rich_loc, logger *) final override { auto_diagnostic_group d; diagnostic_metadata m; @@ -1010,7 +1010,7 @@ public: return OPT_Wanalyzer_possible_null_dereference; } - bool emit (rich_location *rich_loc) final override + bool emit (rich_location *rich_loc, logger *) final override { /* CWE-690: Unchecked Return Value to NULL Pointer Dereference. */ diagnostic_metadata m; @@ -1099,7 +1099,7 @@ public: return OPT_Wanalyzer_possible_null_argument; } - bool emit (rich_location *rich_loc) final override + bool emit (rich_location *rich_loc, logger *) final override { /* CWE-690: Unchecked Return Value to NULL Pointer Dereference. */ auto_diagnostic_group d; @@ -1152,7 +1152,7 @@ public: bool terminate_path_p () const final override { return true; } - bool emit (rich_location *rich_loc) final override + bool emit (rich_location *rich_loc, logger *) final override { /* CWE-476: NULL Pointer Dereference. */ diagnostic_metadata m; @@ -1207,7 +1207,7 @@ public: bool terminate_path_p () const final override { return true; } - bool emit (rich_location *rich_loc) final override + bool emit (rich_location *rich_loc, logger *) final override { /* CWE-476: NULL Pointer Dereference. */ auto_diagnostic_group d; @@ -1264,7 +1264,7 @@ public: return OPT_Wanalyzer_use_after_free; } - bool emit (rich_location *rich_loc) final override + bool emit (rich_location *rich_loc, logger *) final override { /* CWE-416: Use After Free. */ diagnostic_metadata m; @@ -1358,7 +1358,7 @@ public: return OPT_Wanalyzer_malloc_leak; } - bool emit (rich_location *rich_loc) final override + bool emit (rich_location *rich_loc, logger *) final override { /* "CWE-401: Missing Release of Memory after Effective Lifetime". */ diagnostic_metadata m; @@ -1432,7 +1432,7 @@ public: return OPT_Wanalyzer_free_of_non_heap; } - bool emit (rich_location *rich_loc) final override + bool emit (rich_location *rich_loc, logger *) final override { auto_diagnostic_group d; diagnostic_metadata m; @@ -1511,7 +1511,7 @@ public: return OPT_Wanalyzer_deref_before_check; } - bool emit (rich_location *rich_loc) final override + bool emit (rich_location *rich_loc, logger *) final override { /* Don't emit the warning if we can't show where the deref and the check occur. */ |