From 2276d836398564a90f5ff237e63ca3104ae509f0 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 11 Jul 2002 11:11:56 +0000 Subject: [PATCH] Fixup warnings and undefined operations that show up in gcc-3.1 -Erik --- archival/libunarchive/deb_extract.c | 3 ++- archival/libunarchive/get_header_ar.c | 3 ++- archival/libunarchive/get_header_cpio.c | 3 ++- archival/libunarchive/get_header_tar.c | 3 ++- archival/libunarchive/seek_sub_file.c | 3 ++- coreutils/md5sum.c | 10 +++++----- coreutils/uuencode.c | 3 ++- editors/sed.c | 6 ++++-- networking/ifconfig.c | 3 ++- networking/telnet.c | 1 + shell/ash.c | 4 ++-- 11 files changed, 26 insertions(+), 16 deletions(-) diff --git a/archival/libunarchive/deb_extract.c b/archival/libunarchive/deb_extract.c index e5b5c9685..b95ac4d1f 100644 --- a/archival/libunarchive/deb_extract.c +++ b/archival/libunarchive/deb_extract.c @@ -80,4 +80,5 @@ char *deb_extract(const char *package_filename, FILE *out_stream, free(file_list); } return(output_buffer); -} \ No newline at end of file +} + diff --git a/archival/libunarchive/get_header_ar.c b/archival/libunarchive/get_header_ar.c index d2840e0e3..1618b767f 100644 --- a/archival/libunarchive/get_header_ar.c +++ b/archival/libunarchive/get_header_ar.c @@ -103,4 +103,5 @@ file_header_t *get_header_ar(FILE *src_stream) typed->gid = atoi(ar.formated.gid); return(typed); -} \ No newline at end of file +} + diff --git a/archival/libunarchive/get_header_cpio.c b/archival/libunarchive/get_header_cpio.c index a2136e441..cd48601b6 100644 --- a/archival/libunarchive/get_header_cpio.c +++ b/archival/libunarchive/get_header_cpio.c @@ -133,4 +133,5 @@ file_header_t *get_header_cpio(FILE *src_stream) } } return(cpio_entry); -} \ No newline at end of file +} + diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index 639e2dc36..be6bf2a06 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c @@ -96,4 +96,5 @@ file_header_t *get_header_tar(FILE *tar_stream) strtol(tar.formated.devminor, NULL, 8); return(tar_entry); -} \ No newline at end of file +} + diff --git a/archival/libunarchive/seek_sub_file.c b/archival/libunarchive/seek_sub_file.c index 72a3754bc..7523a52ab 100644 --- a/archival/libunarchive/seek_sub_file.c +++ b/archival/libunarchive/seek_sub_file.c @@ -32,4 +32,5 @@ void seek_sub_file(FILE *src_stream, const int count) } } return; -} \ No newline at end of file +} + diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c index 83c769ef2..f5be4486c 100644 --- a/coreutils/md5sum.c +++ b/coreutils/md5sum.c @@ -434,7 +434,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct temp += FI(B,C,D); } temp += cwp[(int)(*pp++)] + *pc++; - temp = CYCLIC (temp, ps[i&3]); + CYCLIC (temp, ps[i&3]); temp += B; A = D; D = C; C = B; B = temp; } @@ -443,7 +443,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct for ( i = 0 ; i < 16 ; i++ ) { temp = A + FF(B,C,D) + cwp[(int)(*pp++)] + *pc++; - temp = CYCLIC (temp, ps[i&3]); + CYCLIC (temp, ps[i&3]); temp += B; A = D; D = C; C = B; B = temp; } @@ -451,21 +451,21 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct ps += 4; for ( i = 0 ; i < 16 ; i++ ) { temp = A + FG(B,C,D) + cwp[(int)(*pp++)] + *pc++; - temp = CYCLIC (temp, ps[i&3]); + CYCLIC (temp, ps[i&3]); temp += B; A = D; D = C; C = B; B = temp; } ps += 4; for ( i = 0 ; i < 16 ; i++ ) { temp = A + FH(B,C,D) + cwp[(int)(*pp++)] + *pc++; - temp = CYCLIC (temp, ps[i&3]); + CYCLIC (temp, ps[i&3]); temp += B; A = D; D = C; C = B; B = temp; } ps += 4; for ( i = 0 ; i < 16 ; i++ ) { temp = A + FI(B,C,D) + cwp[(int)(*pp++)] + *pc++; - temp = CYCLIC (temp, ps[i&3]); + CYCLIC (temp, ps[i&3]); temp += B; A = D; D = C; C = B; B = temp; } diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c index 24b9f1c6a..1d42494fd 100644 --- a/coreutils/uuencode.c +++ b/coreutils/uuencode.c @@ -21,6 +21,7 @@ */ #include #include +#include #include #include #include @@ -49,7 +50,7 @@ static char tbl_std[65] = { 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', - '\`' /* termination character */ + '`' /* termination character */ }; /* diff --git a/editors/sed.c b/editors/sed.c index 93faf00c2..84aea9b0a 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -401,8 +401,10 @@ static char *parse_cmd_str(struct sed_cmd * const sed_cmd, const char *const cmd idx = get_address(sed_cmd, cmdstr, &sed_cmd->beg_line, &sed_cmd->beg_match); /* second part (if present) will begin with a comma */ - if (cmdstr[idx] == ',') - idx += get_address(sed_cmd, &cmdstr[++idx], &sed_cmd->end_line, &sed_cmd->end_match); + if (cmdstr[idx] == ',') { + idx++; + idx += get_address(sed_cmd, &cmdstr[idx], &sed_cmd->end_line, &sed_cmd->end_match); + } /* skip whitespace before the command */ while (isspace(cmdstr[idx])) diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 9e87c8be5..3ada4f178 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c @@ -15,7 +15,7 @@ * Foundation; either version 2 of the License, or (at * your option) any later version. * - * $Id: ifconfig.c,v 1.17 2002/07/03 11:46:34 andersen Exp $ + * $Id: ifconfig.c,v 1.18 2002/07/11 11:11:52 andersen Exp $ * */ @@ -504,6 +504,7 @@ int ifconfig_main(int argc, char **argv) } } LOOP: + continue; } /* end of while-loop */ return goterr; diff --git a/networking/telnet.c b/networking/telnet.c index 86d672c2d..14b71c85d 100644 --- a/networking/telnet.c +++ b/networking/telnet.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/shell/ash.c b/shell/ash.c index 3d7043c8f..64761b9aa 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -11129,7 +11129,7 @@ redirect(union node *redir, int flags) { union node *n; struct redirtab *sv = NULL; - int i; + int i = EMPTY; int fd; int newfd; int try; @@ -12440,7 +12440,7 @@ findvar(struct var **vpp, const char *name) /* * Copyright (c) 1999 Herbert Xu * This file contains code for the times builtin. - * $Id: ash.c,v 1.54 2002/07/04 00:19:46 andersen Exp $ + * $Id: ash.c,v 1.55 2002/07/11 11:11:51 andersen Exp $ */ static int timescmd (int argc, char **argv) { -- 2.25.1