[Scummvm-git-logs] scummvm master -> b725686077ca6eb75351fbe2aeba91a012559a71

LittleToonCat noreply at scummvm.org
Sun Apr 9 22:00:06 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b725686077 BACKENDS: ENET: Fix GCC/MinGW warning


Commit: b725686077ca6eb75351fbe2aeba91a012559a71
    https://github.com/scummvm/scummvm/commit/b725686077ca6eb75351fbe2aeba91a012559a71
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2023-04-09T19:00:01-03:00

Commit Message:
BACKENDS: ENET: Fix GCC/MinGW warning

packet.cpp:121:9: warning: declaration of 'byte' shadows a global declaration [-Wshadow]
  121 |     int byte;
      |         ^~~~
In file included from C:/msys64/mingw64/include/wtypes.h:8,
                 from C:/msys64/mingw64/include/winscard.h:10,
                 from C:/msys64/mingw64/include/windows.h:97,
                 from C:/msys64/mingw64/include/winsock2.h:23,
                 from C:/Projects/scummvm/backends/networking/enet/source/win32.h:18,
                 from C:/Projects/scummvm/backends/networking/enet/source/enet.h:16,
                 from C:/Projects/scummvm/backends/networking/enet/source/packet.cpp:7:
C:/msys64/mingw64/include/rpcndr.h:63:25: note: shadowed declaration is here
   63 |   typedef unsigned char byte;
      |                         ^~~~

Fix by defining WIN32_LEAN_AND_MEAN, which prevents this typedef.

Changed paths:
    backends/networking/enet/source/win32.h


diff --git a/backends/networking/enet/source/win32.h b/backends/networking/enet/source/win32.h
index e73ca9d052b..1dcc938bf09 100644
--- a/backends/networking/enet/source/win32.h
+++ b/backends/networking/enet/source/win32.h
@@ -15,6 +15,8 @@
 #endif
 
 #include <stdlib.h>
+#undef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
 #include <winsock2.h>
 
 typedef SOCKET ENetSocket;




More information about the Scummvm-git-logs mailing list