Commit 9ae71512 authored by Paul Eggert's avatar Paul Eggert
Browse files

* 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.
parent b3967b18
......@@ -2,6 +2,8 @@
 
* unexelf.c (unexec): Name an expression,
to avoid gcc -Wbad-function-cast warning.
Use a different way to cause a compilation error if anyone uses
n rather than nn, a way that does not involve shadowing.
 
* deps.mk (unexalpha.o): Remove; unused.
 
......@@ -1235,8 +1235,8 @@ unexec (const char *new_name, const char *old_name)
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 @@ unexec (const char *new_name, const char *old_name)
}
break;
}
#undef n
}
/* Write out new_file, and free the buffers. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment