Fix some WARNS:

1) Remove some unused variables.
2) Mark some things aas static or __unused.
3) Cast to make sure we're comparing the same types.
This commit is contained in:
David Malone 2004-02-15 22:48:25 +00:00
parent feeb25809c
commit c4dd6db19b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125859
3 changed files with 7 additions and 8 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;