diff options
author | Anders Broman <anders.broman@ericsson.com> | 2005-07-26 09:31:04 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2005-07-26 09:31:04 +0000 |
commit | 5e241d8a7c963052619d8a793378ae3da34c644a (patch) | |
tree | f95660a68c2889cdb461bc8d91804de2341d0ee8 /getopt.c | |
parent | fbb92df9f48b31d97fd7a3b8ee62788cc689ac7d (diff) |
From Peter Johansson:
The supplied patch takes care of the following compilation warnings:
getopt.c(409) : warning C4013: 'strcmp' undefined; assuming extern
returning int
getopt.c(478) : warning C4013: 'strncmp' undefined; assuming extern
returning int
getopt.c(480) : warning C4013: 'strlen' undefined; assuming extern
returning int
svn path=/trunk/; revision=15083
Diffstat (limited to 'getopt.c')
-rw-r--r-- | getopt.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -28,6 +28,8 @@ #include "config.h" #endif +#include <string.h> + #ifndef __STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ @@ -477,7 +479,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) p++, option_index++) if (!strncmp (p->name, nextchar, s - nextchar)) { - if (s - nextchar == strlen (p->name)) + if ((size_t)(s - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; |