diff --git a/gdb-7.1-werror.patch b/gdb-7.1-werror.patch new file mode 100644 index 0000000..d6547df --- /dev/null +++ b/gdb-7.1-werror.patch @@ -0,0 +1,50 @@ +--- gdb/tui/tui-regs.c 2010-01-01 08:32:07.000000000 +0100 ++++ gdb/tui/tui-regs.c 2010-04-20 09:23:59.000000000 +0200 +@@ -541,7 +541,12 @@ + int i; + + if (data->highlight) +- wstandout (win_info->handle); ++ /* We ignore the return value, casting it to void in order to avoid ++ a compiler warning. The warning itself was introduced by a patch ++ to ncurses 5.7 dated 2009-08-29, changing this macro to expand ++ to code that causes the compiler to generate an unused-value ++ warning. */ ++ (void) wstandout (win_info->handle); + + wmove (win_info->handle, 0, 0); + for (i = 1; i < win_info->width; i++) +@@ -551,7 +556,12 @@ + waddstr (win_info->handle, data->content); + + if (data->highlight) +- wstandend (win_info->handle); ++ /* We ignore the return value, casting it to void in order to avoid ++ a compiler warning. The warning itself was introduced by a patch ++ to ncurses 5.7 dated 2009-08-29, changing this macro to expand ++ to code that causes the compiler to generate an unused-value ++ warning. */ ++ (void) wstandend (win_info->handle); + tui_refresh_win (win_info); + } + } +--- gdb/tui/tui-stack.c 2010-01-01 08:32:07.000000000 +0100 ++++ gdb/tui/tui-stack.c 2010-04-20 09:23:59.000000000 +0200 +@@ -256,10 +256,15 @@ + + string = tui_make_status_line (&element->which_element.locator); + wmove (locator->handle, 0, 0); +- wstandout (locator->handle); ++ /* We ignore the return value from wstandout and wstandend, casting ++ them to void in order to avoid a compiler warning. The warning ++ itself was introduced by a patch to ncurses 5.7 dated 2009-08-29, ++ changing these macro to expand to code that causes the compiler ++ to generate an unused-value warning. */ ++ (void) wstandout (locator->handle); + waddstr (locator->handle, string); + wclrtoeol (locator->handle); +- wstandend (locator->handle); ++ (void) wstandend (locator->handle); + tui_refresh_win (locator); + wmove (locator->handle, 0, 0); + xfree (string); diff --git a/gdb.changes b/gdb.changes index f036107..80d425b 100644 --- a/gdb.changes +++ b/gdb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Apr 22 19:13:48 UTC 2010 - aj@suse.de + +- Add upstream change to fix build with -Werror + ------------------------------------------------------------------- Thu Apr 15 14:22:36 CEST 2010 - rguenther@novell.com diff --git a/gdb.spec b/gdb.spec index 83a8558..5115bf3 100644 --- a/gdb.spec +++ b/gdb.spec @@ -24,7 +24,7 @@ Name: gdb # NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3 # and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch). Version: 7.1 -Release: 1 +Release: 2 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. @@ -433,6 +433,9 @@ Patch447: gdb-bz578250-avx-09of10.patch Patch448: gdb-bz578250-avx-10of10.patch Patch449: gdb-bz578250-avx-10of10-ppc.patch +# Upstream patch to fix gcc -Werror +Patch500: gdb-7.1-werror.patch + # Fix readline 5.1 warnings Patch1000: readline-5.1-random.patch Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch @@ -661,6 +664,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c %patch447 -p1 %patch448 -p1 %patch449 -p1 +%patch500 -p0 %patch1000 %patch1002 -p1