Remove some compile warnings on current MinGW

This commit is contained in:
Thomas Jensen 2019-03-29 18:29:20 +01:00
parent 3b767eab62
commit 8d68f9adb0
3 changed files with 9 additions and 6 deletions

View File

@ -24,6 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

View File

@ -74,11 +74,10 @@
#ifdef VMS
# include <unixlib.h>
# if HAVE_STRING_H - 0
# include <string.h>
# endif
#endif
#include <string.h>
#ifndef _
/* This is for other GNU distributions with internationalized messages.
When compiling libc, the _ macro is predefined. */
@ -696,17 +695,19 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
}
else
{
if (opterr)
if (argv[optind - 1][1] == '-')
if (opterr) {
if (argv[optind - 1][1] == '-') {
/* --option */
fprintf (stderr,
_("%s: option `--%s' doesn't allow an argument\n"),
argv[0], pfound->name);
else
} else {
/* +option or -option */
fprintf (stderr,
_("%s: option `%c%s' doesn't allow an argument\n"),
argv[0], argv[optind - 1][0], pfound->name);
}
}
nextchar += strlen (nextchar);

View File

@ -28,6 +28,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include "shape.h"
#include "boxes.h"
#include "tools.h"