os_win.cpp: Fix PATH_MAX redefinition warning #2797

Merged
merged 1 commit into from Feb 2, 2017

Projects

None yet

2 participants

@davidebeatrici
Member

The macro should be undefined and then defined again to change its value.
This fixes the following warning when compiling with MinGW:

warning: "PATH_MAX" redefined
src/mumble/os_win.cpp
@@ -20,6 +20,7 @@ extern "C" {
void mumble_speex_init();
};
+#undef PATH_MAX
@mkrautz
mkrautz Feb 1, 2017 Member

PATH_MAX is already overloaded in os_win.cpp in the sense that it's also used for the comment.

Let's just rename it instead.

#define DUMP_BUFFER_SIZE 1024

and use that instead?

@davidebeatrici
davidebeatrici Feb 2, 2017 Member

Yes, it would be much better than undefining a system macro.

@davidebeatrici davidebeatrici os_win.cpp: Fix PATH_MAX redefinition warning
The macro should be undefined and then defined again to change its value, but it's better if we use a dedicated macro instead.
This fixes the following warning when compiling with MinGW:
warning: "PATH_MAX" redefined
2966e5f
@mkrautz
mkrautz approved these changes Feb 2, 2017 View changes
@mkrautz mkrautz merged commit 51bb441 into mumble-voip:master Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment