summaryrefslogtreecommitdiff
path: root/src/unexelf.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-03-16 19:07:47 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-03-16 19:07:47 -0700
commit9ae7151257f2457c0a6d89fb2b97f59fb18f1b96 (patch)
tree1f448c6caedb7b54d84d97e2b825f2977d7ad49b /src/unexelf.c
parentb3967b18cddd39cd736af29db48096716f35fbdf (diff)
downloademacs-9ae7151257f2457c0a6d89fb2b97f59fb18f1b96.tar.gz
* unexelf.c: Use a different way to cause a compilation error if anyone uses
n rather than nn, a way that does not involve shadowing.
Diffstat (limited to 'src/unexelf.c')
-rw-r--r--src/unexelf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/unexelf.c b/src/unexelf.c
index 01d41a15d50..3e664307d59 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -1235,8 +1235,8 @@ temacs:
ElfW(Shdr) section = NEW_SECTION_H (n);
/* Cause a compilation error if anyone uses n instead of nn below. */
- struct {int a;} n;
- (void)n.a; /* Prevent `unused variable' warnings. */
+ #define n ((void) 0);
+ n /* Prevent 'macro "n" is not used' warnings. */
switch (section.sh_type)
{
@@ -1283,6 +1283,8 @@ temacs:
}
break;
}
+
+ #undef n
}
/* Write out new_file, and free the buffers. */