diff options
author | Pedro Alves <palves@redhat.com> | 2017-03-08 15:52:16 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-03-08 15:52:16 +0000 |
commit | 15c22686d0e33d87262bc9075296eeddd7d955f7 (patch) | |
tree | 207325989a71f2e57a38c0d4989787d6731ab036 /gdb/common | |
parent | 1fc87489b40b3100badf184a7c266387bae47def (diff) | |
download | binutils-gdb-15c22686d0e33d87262bc9075296eeddd7d955f7.tar.gz |
gdb: Fix ATTRIBUTE_NONNULL usage
Should fix the build failure with Clang mentioned at
<https://sourceware.org/bugzilla/show_bug.cgi?id=21206#c2>:
In file included from ../../binutils-gdb/gdb/dwarf2read.c:72:
../../binutils-gdb/gdb/common/gdb_unlinker.h:35:35: error: '__nonnull__' attribute is invalid for the implicit this argument
unlinker (const char *filename) ATTRIBUTE_NONNULL (1)
^ ~
../../binutils-gdb/gdb/../include/ansidecl.h:169:48: note: expanded from macro 'ATTRIBUTE_NONNULL'
# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
gdb/ChangeLog:
2017-03-08 Pedro Alves <palves@redhat.com>
PR 21206
* common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
goes to argument 2, not 1.
Diffstat (limited to 'gdb/common')
-rw-r--r-- | gdb/common/gdb_unlinker.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/common/gdb_unlinker.h b/gdb/common/gdb_unlinker.h index 0f3b98a54ff..e93fa79e167 100644 --- a/gdb/common/gdb_unlinker.h +++ b/gdb/common/gdb_unlinker.h @@ -32,7 +32,7 @@ class unlinker { public: - unlinker (const char *filename) ATTRIBUTE_NONNULL (1) + unlinker (const char *filename) ATTRIBUTE_NONNULL (2) : m_filename (filename) { gdb_assert (filename != NULL); |