diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/gcore/aoutcore.c | 6 | ||||
-rw-r--r-- | usr.bin/gcore/elfcore.c | 7 | ||||
-rw-r--r-- | usr.bin/gcore/gcore.c | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/usr.bin/gcore/aoutcore.c b/usr.bin/gcore/aoutcore.c index dfb8718..fac3fb9 100644 --- a/usr.bin/gcore/aoutcore.c +++ b/usr.bin/gcore/aoutcore.c @@ -126,7 +126,7 @@ aoutident(int efd, pid_t pid, char *binfile) errx(1, "%d: process exiting", pid); if (ki->ki_flag & P_SYSTEM) /* Swapper or pagedaemon. */ errx(1, "%d: system process", pid); - if (exec.a_text != ptoa(ki->ki_tsize)) + if (exec.a_text != (unsigned long)ptoa(ki->ki_tsize)) errx(1, "The executable %s does not belong to" " process %d!\n" "Text segment size (in bytes): executable %ld," @@ -142,8 +142,8 @@ aoutident(int efd, pid_t pid, char *binfile) * core -- * Build the core file. */ -void -aoutcore(int efd, int fd, pid_t pid) +static void +aoutcore(int efd, int fd, pid_t pid __unused) { union { struct user user; diff --git a/usr.bin/gcore/elfcore.c b/usr.bin/gcore/elfcore.c index bdfd9bb..c6a161d 100644 --- a/usr.bin/gcore/elfcore.c +++ b/usr.bin/gcore/elfcore.c @@ -80,11 +80,10 @@ static void readhdrinfo(pid_t, prstatus_t *, prfpregset_t *, prpsinfo_t *); static vm_map_entry_t readmap(pid_t); static int -elf_ident(int efd, pid_t pid, char *binfile) +elf_ident(int efd, pid_t pid __unused, char *binfile __unused) { Elf_Ehdr hdr; int cnt; - uid_t uid; cnt = read(efd, &hdr, sizeof(hdr)); if (cnt != sizeof(hdr)) @@ -97,8 +96,8 @@ elf_ident(int efd, pid_t pid, char *binfile) /* * Write an ELF coredump for the given pid to the given fd. */ -void -elf_coredump(int efd, int fd, pid_t pid) +static void +elf_coredump(int efd __unused, int fd, pid_t pid) { vm_map_entry_t map; struct sseg_closure seginfo; diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c index 4db514d..7005e83 100644 --- a/usr.bin/gcore/gcore.c +++ b/usr.bin/gcore/gcore.c @@ -83,7 +83,7 @@ SET_DECLARE(dumpset, struct dumpers); int main(int argc, char *argv[]) { - int ch, cnt, efd, fd, sflag; + int ch, efd, fd, sflag; char *binfile, *corefile; char fname[MAXPATHLEN]; struct dumpers **d, *dumper; |