ref: 941d0237545be9f19b8881d78e0799ab7ce1af8d
parent: 86c5fb1c6fc66b64edcc420a587cc32f87549cca
author: robs <robs>
date: Sat Feb 16 12:56:47 EST 2008
warning fix
--- a/src/getopt.c
+++ b/src/getopt.c
@@ -219,13 +219,11 @@
whose names are inconsistent. */
#ifndef getenv
-extern char *getenv ();
+extern char *getenv (char const *);
#endif
static char *
-my_index (str, chr)
- const char *str;
- int chr;
+my_index (char const * str, int chr)
{
while (*str)
{
@@ -451,6 +449,8 @@
}
else
nonoption_flags_len = 0;
+#else
+ (void)argc, (void)argv;
#endif
return optstring;
@@ -660,7 +660,7 @@
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
+ if (!strncmp (p->name, nextchar, (unsigned)(nameend - nextchar)))
{
if ((unsigned int) (nameend - nextchar)
== (unsigned int) strlen (p->name))
@@ -998,7 +998,7 @@
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
+ if (!strncmp (p->name, nextchar, (unsigned)(nameend - nextchar)))
{
if ((unsigned int) (nameend - nextchar) == strlen (p->name))
{