Page MenuHomeFreeBSD

D31608.diff
No OneTemporary

D31608.diff

diff --git a/usr.sbin/crunch/crunchide/crunchide.c b/usr.sbin/crunch/crunchide/crunchide.c
--- a/usr.sbin/crunch/crunchide/crunchide.c
+++ b/usr.sbin/crunch/crunchide/crunchide.c
@@ -76,7 +76,7 @@
#include "extern.h"
-char *pname = "crunchide";
+static const char *pname = "crunchide";
void usage(void);
@@ -85,7 +85,7 @@
int hide_syms(const char *filename);
-int verbose;
+static int verbose;
int main(int, char *[]);
@@ -137,7 +137,7 @@
/* ---------------------------- */
-struct keep {
+static struct keep {
struct keep *next;
char *sym;
} *keep_list;
@@ -206,7 +206,7 @@
/* ---------------------------- */
-struct {
+static struct {
const char *name;
int (*check)(int, const char *); /* 1 if match, zero if not */
int (*hide)(int, const char *); /* non-zero if error */
diff --git a/usr.sbin/crunch/crunchide/exec_elf32.c b/usr.sbin/crunch/crunchide/exec_elf32.c
--- a/usr.sbin/crunch/crunchide/exec_elf32.c
+++ b/usr.sbin/crunch/crunchide/exec_elf32.c
@@ -155,7 +155,7 @@
}
int
-ELFNAMEEND(check)(int fd, const char *fn)
+ELFNAMEEND(check)(int fd, const char *fn __unused)
{
Elf_Ehdr eh;
struct stat sb;
@@ -435,12 +435,12 @@
* update section header table in ascending order of offset
*/
for (i = strtabidx + 1; i < shnum; i++) {
- Elf_Off off, align;
- off = xewtoh(layoutp[i - 1].shdr->sh_offset) +
+ Elf_Off soff, align;
+ soff = xewtoh(layoutp[i - 1].shdr->sh_offset) +
xewtoh(layoutp[i - 1].shdr->sh_size);
align = xewtoh(layoutp[i].shdr->sh_addralign);
- off = (off + (align - 1)) & ~(align - 1);
- layoutp[i].shdr->sh_offset = htoxew(off);
+ soff = (soff + (align - 1)) & ~(align - 1);
+ layoutp[i].shdr->sh_offset = htoxew(soff);
}
/*

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 15, 7:49 PM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9091930
Default Alt Text
D31608.diff (1 KB)

Event Timeline