mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-25 07:49:18 +00:00
-Wall fixes.
This commit is contained in:
parent
4f79d873c1
commit
588a09b4fb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=54468
@ -56,7 +56,7 @@ static const char rcsid[] =
|
||||
|
||||
#define MAXNUM 65 /* Biggest number we handle. */
|
||||
|
||||
static char *name1[] = {
|
||||
static const char *name1[] = {
|
||||
"", "one", "two", "three",
|
||||
"four", "five", "six", "seven",
|
||||
"eight", "nine", "ten", "eleven",
|
||||
@ -133,6 +133,7 @@ convert(line)
|
||||
int flen, len, rval;
|
||||
char *p, *fraction;
|
||||
|
||||
flen = NULL;
|
||||
fraction = NULL;
|
||||
for (p = line; *p != '\0' && *p != '\n'; ++p) {
|
||||
if (isblank(*p)) {
|
||||
@ -163,7 +164,7 @@ badnum: errx(1, "illegal number: %s", line);
|
||||
*p = '\0';
|
||||
|
||||
if ((len = strlen(line)) > MAXNUM ||
|
||||
fraction != NULL && (flen = strlen(fraction)) > MAXNUM)
|
||||
(fraction != NULL && ((flen = strlen(fraction)) > MAXNUM)))
|
||||
errx(1, "number too large, max %d digits.", MAXNUM);
|
||||
|
||||
if (*line == '-') {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* piano.c - a piano emulator
|
||||
*/
|
||||
static char rcsid[] =
|
||||
static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -136,8 +136,6 @@ nain(void)
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
extern char *optarg;
|
||||
extern int optind, opterr;
|
||||
int ch, ex, show_usage = 0;
|
||||
myname = argv[0];
|
||||
while ((ch = getopt(argc, argv, "-vi:")) != -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user