aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2016-10-10 19:22:40 +0300
committerEli Zaretskii2016-10-10 19:22:40 +0300
commitdb677f5dfedc0a665211d1113251e77a01e5d5e3 (patch)
treece9e0e8fd3d0f1b4b55205c7c9e3f519a23dbf5c /src
parentfd45b3f604cd52c17bd32fe27c425bc79545f52c (diff)
downloademacs-db677f5dfedc0a665211d1113251e77a01e5d5e3.tar.gz
emacs-db677f5dfedc0a665211d1113251e77a01e5d5e3.zip
Fix compilation warnings on MS-Windows
* src/w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Remove definitions of these macros, which seem to be unneeded and cause compiler warnings. * src/fileio.c (NOMINMAX): Avoid compiler warnings about unused macros. * src/firstfile.c (dummy_main_reference): Rename from 'dummy' and make it external, to avoid compiler warning.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c4
-rw-r--r--src/firstfile.c4
-rw-r--r--src/w32.c9
3 files changed, 6 insertions, 11 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 8f16d1e8496..6026d8ebad4 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -60,6 +60,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
60#ifdef WINDOWSNT 60#ifdef WINDOWSNT
61#define NOMINMAX 1 61#define NOMINMAX 1
62#include <windows.h> 62#include <windows.h>
63/* The redundant #ifdef is to avoid compiler warning about unused macro. */
64#ifdef NOMINMAX
65#undef NOMINMAX
66#endif
63#include <sys/file.h> 67#include <sys/file.h>
64#include "w32.h" 68#include "w32.h"
65#endif /* not WINDOWSNT */ 69#endif /* not WINDOWSNT */
diff --git a/src/firstfile.c b/src/firstfile.c
index 188d4f81b5c..962d6f6c7f6 100644
--- a/src/firstfile.c
+++ b/src/firstfile.c
@@ -26,7 +26,7 @@ char my_begbss[1]; /* Do not initialize this variable. */
26static char _my_begbss[1]; 26static char _my_begbss[1];
27char * my_begbss_static = _my_begbss; 27char * my_begbss_static = _my_begbss;
28 28
29/* Add a dummy reference to ensure emacs.obj is linked in. */ 29/* Add a dummy reference to ensure emacs.o is linked in. */
30extern int main (int, char **); 30extern int main (int, char **);
31static int (*dummy) (int, char **) = main; 31int (*dummy_main_reference) (int, char **) = main;
32#endif 32#endif
diff --git a/src/w32.c b/src/w32.c
index 517e286eaa9..ad7d94a21d2 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -94,13 +94,6 @@ extern void dynlib_reset_last_error (void);
94#include <pwd.h> 94#include <pwd.h>
95#include <grp.h> 95#include <grp.h>
96 96
97/* MinGW64 defines these in its _mingw.h. */
98#ifndef _ANONYMOUS_UNION
99# define _ANONYMOUS_UNION
100#endif
101#ifndef _ANONYMOUS_STRUCT
102# define _ANONYMOUS_STRUCT
103#endif
104#include <windows.h> 97#include <windows.h>
105/* Some versions of compiler define MEMORYSTATUSEX, some don't, so we 98/* Some versions of compiler define MEMORYSTATUSEX, some don't, so we
106 use a different name to avoid compilation problems. */ 99 use a different name to avoid compilation problems. */
@@ -282,8 +275,6 @@ extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
282 struct timespec *, void *); 275 struct timespec *, void *);
283extern int sys_dup (int); 276extern int sys_dup (int);
284 277
285
286
287 278
288/* Initialization states. 279/* Initialization states.
289 280