Fix warnings trivial warnings.

Fix warnings about:
 . Unused variables
 . format mismatch in printf/scanf format string and arguments
 . Missing parenthesis around assignment as truth values
 . Clang warnings anout unknown GCC pragma
This commit is contained in:
2013-01-14 11:44:31 +01:00
parent 77399bd649
commit 0ac803292e
65 changed files with 297 additions and 284 deletions
+2 -2
View File
@@ -70,7 +70,7 @@ static int lookup_op();
exprcmd(argc, argv) char **argv; {
int exprcmd(argc, argv) int argc; char **argv; {
char **ap;
char *opname;
char c;
@@ -178,7 +178,7 @@ overflow: error("Expression too complex");
if (valsp->type == INTEGER) {
p = stalloc(32);
#ifdef SHELL
fmtstr(p, 32, "%d", valsp->u.num);
fmtstr(p, 32, "%ld", valsp->u.num);
#else
sprintf(p, "%d", valsp->u.num);
#endif
+4
View File
@@ -103,7 +103,9 @@ STATIC pid_t initialpgrp; /* pgrp of shell on invocation */
int in_waitcmd = 0; /* are we in waitcmd()? */
int in_dowait = 0; /* are we in dowait()? */
volatile sig_atomic_t breakwaitcmd = 0; /* should wait be terminated? */
#if JOBS
static int ttyfd = -1;
#endif
#ifndef WCOREDUMP
#define WCOREDUMP(s) ((s) & 0x80)
@@ -328,7 +330,9 @@ showjob(struct job *jp, pid_t pid, int sformat, int lformat)
{
char s[64];
struct procstat *ps;
#if JOBS
struct job *j;
#endif
int col, curr, i, jobno, prev, procno;
char c;
+2
View File
@@ -90,11 +90,13 @@ readcmd(int argc __unused, char **argv __unused)
int i;
struct timeval tv;
char *tvptr;
#ifndef __minix
#ifndef __minix_vmd
fd_set ifds;
#endif
struct termios told, tnew;
int tsaved;
#endif
rflag = 0;
prompt = NULL;
+2
View File
@@ -31,7 +31,9 @@
*/
#ifndef lint
#if 0
static char sccsid[] = "@(#)output.c 8.1 (Berkeley) 5/31/93";
#endif
#endif /* not lint */
/*