public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: Always suppress stringop-overread warning in debuginfod-support.c
@ 2022-06-15 0:38 Mark Wielaard
0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2022-06-15 0:38 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=dac0515d825e788dec188fff4d5b9d4ac7383f33
commit dac0515d825e788dec188fff4d5b9d4ac7383f33
Author: Mark Wielaard <mark@klomp.org>
Date: Tue May 31 11:00:06 2022 +0200
gdb: Always suppress stringop-overread warning in debuginfod-support.c
Just like on s390x with g++ 11.2.1 and ppc64le with g++ 11.3.1 g++ 11
on hppa produces a spurious warning for stringop-overread in
debuginfod_is_enabled for url_view. Just always suppress it on all
arches.
https://sourceware.org/bugzilla/show_bug.cgi?id=29198
gdb/ChangeLog:
* debuginfod-support.c (debuginfod_is_enabled): Always use
DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD.
Diff:
---
gdb/debuginfod-support.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c
index 6dc08fc29b6..9dbe6b5d8b2 100644
--- a/gdb/debuginfod-support.c
+++ b/gdb/debuginfod-support.c
@@ -193,17 +193,14 @@ debuginfod_is_enabled ()
if (off == gdb::string_view::npos)
break;
url_view = url_view.substr (off);
-#if defined (__s390x__) || defined (__powerpc64__)
- /* g++ 11.2.1 on s390x and g++ 11.3.1 on ppc64le seem convinced
- url_view might be of SIZE_MAX length. And so complains
- because the length of an array can only be PTRDIFF_MAX. */
+ /* g++ 11.2.1 on s390x, g++ 11.3.1 on ppc64le and g++ 11 on
+ hppa seem convinced url_view might be of SIZE_MAX length.
+ And so complains because the length of an array can only
+ be PTRDIFF_MAX. */
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD
-#endif
off = url_view.find_first_of (' ');
-#if defined (__s390x__) || defined (__powerpc64__)
DIAGNOSTIC_POP
-#endif
gdb_printf
(_(" <%ps>\n"),
styled_string (file_name_style.style (),
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-15 0:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 0:38 [binutils-gdb] gdb: Always suppress stringop-overread warning in debuginfod-support.c Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).