gnucash maint: Fix missing prototype error, void end of function error on Windows.
John Ralls
jralls at code.gnucash.org
Thu Mar 25 16:36:37 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/f3c2d1e1 (commit)
from https://github.com/Gnucash/gnucash/commit/db4417b2 (commit)
commit f3c2d1e1455a2447b57d6bbe86fcada338eca4ff
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Mar 25 13:31:19 2021 -0700
Fix missing prototype error, void end of function error on Windows.
MinGW64 gcc silently ignores C prototype with no arguments, issuing
a missing prototype error instead. set_platform_locale must return
a free-able char* even if all of LC_ALL, LC_MESSAGES, and LANG are
unset.
diff --git a/gnucash/gnucash-locale-platform.h b/gnucash/gnucash-locale-platform.h
index 1eab7f8da..737a99b30 100644
--- a/gnucash/gnucash-locale-platform.h
+++ b/gnucash/gnucash-locale-platform.h
@@ -25,6 +25,6 @@
#ifndef GNUCASH_LOCALE_PLATFORM_H
#define GNUCASH_LOCALE_PLATFORM_H
-char *set_platform_locale();
+char *set_platform_locale(void);
#endif
diff --git a/gnucash/gnucash-locale-windows.c b/gnucash/gnucash-locale-windows.c
index 2c3b8a51a..753af7c20 100644
--- a/gnucash/gnucash-locale-windows.c
+++ b/gnucash/gnucash-locale-windows.c
@@ -33,7 +33,7 @@
* retrieve the Windows locale and set POSIX to match.
*/
char *
-set_platform_locale()
+set_platform_locale(void)
{
WCHAR lpLocaleName[LOCALE_NAME_MAX_LENGTH];
char *locale = NULL;
@@ -68,4 +68,5 @@ set_platform_locale()
setlocale (LC_ALL, locale);
return locale;
}
+ return g_strdup("C");
}
Summary of changes:
gnucash/gnucash-locale-platform.h | 2 +-
gnucash/gnucash-locale-windows.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
More information about the gnucash-changes
mailing list