]> git.pld-linux.org Git - packages/elfutils.git/blob - elfutils-scanf.patch
- disable -Werror also in src/ dir
[packages/elfutils.git] / elfutils-scanf.patch
1 --- elfutils-0.137/src/addr2line.c.orig 2008-08-09 06:06:44.000000000 +0200
2 +++ elfutils-0.137/src/addr2line.c      2008-09-09 22:15:16.304992337 +0200
3 @@ -374,8 +374,13 @@ handle_address (const char *string, Dwfl
4        bool parsed = false;
5        int n;
6        char *name = NULL;
7 +#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 7) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
8        if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &n) == 2
9           && string[n] == '\0')
10 +#else
11 +      if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &n) == 2
12 +         && string[n] == '\0')
13 +#endif
14         {
15           /* It was (section)+offset.  This makes sense if there is
16              only one module to look in for a section.  */
17 @@ -415,8 +420,13 @@ handle_address (const char *string, Dwfl
18                 }
19             }
20         }
21 +#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 7) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
22        else if (sscanf (string, "%m[^-+]%" PRIiMAX "%n", &name, &addr, &n) == 2
23                && string[n] == '\0')
24 +#else
25 +      else if (sscanf (string, "%a[^-+]%" PRIiMAX "%n", &name, &addr, &n) == 2
26 +              && string[n] == '\0')
27 +#endif
28         {
29           /* It was symbol+offset.  */
30           GElf_Sym sym;
31 --- elfutils-0.137/src/Makefile.am.orig 2008-09-09 21:30:37.592989823 +0200
32 +++ elfutils-0.137/src/Makefile.am      2008-09-09 22:36:04.380988147 +0200
33 @@ -35,7 +35,7 @@
34  AM_CFLAGS += -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \
35              $(if $($(*F)_no_Werror),,-Werror) \
36              $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
37 -            $(if $($(*F)_no_Wformat),,-Wformat=2) $(CFLAGS_$(*F))
38 +            $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $(CFLAGS_$(*F))
39  
40  INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
41            -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \
42 @@ -109,6 +109,7 @@
43  nm_no_Wformat = yes
44  size_no_Wformat = yes
45  strings_no_Wformat = yes
46 +addr2line_no_Wformat = yes
47  # XXX While the file is not finished, don't warn about this
48  ldgeneric_no_Wunused = yes
49  
This page took 0.031366 seconds and 3 git commands to generate.