-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler warnings on Debian 7 (Wheezy) #255
Comments
When in doubt, consult the manual; quoting mbtowc(3):
Does a diff --git pick.c pick.c
index d318a43..6ab2d9b 100644
--- pick.c
+++ pick.c
@@ -1106,7 +1106,7 @@ xmbtowc(wchar_t *wc, const char *s)
n = mbtowc(wc, s, MB_CUR_MAX);
if (n == -1) {
- mbtowc(NULL, NULL, MB_CUR_MAX);
+ (void)mbtowc(NULL, NULL, MB_CUR_MAX);
return 0;
} |
Sorry, but the paragraph you quoted is not in the manual here ...
No, but: diff --git a/pick.c b/pick.c
index d318a43..28d0494 100644
--- a/pick.c
+++ b/pick.c
@@ -1106,7 +1106,7 @@ xmbtowc(wchar_t *wc, const char *s)
n = mbtowc(wc, s, MB_CUR_MAX);
if (n == -1) {
- mbtowc(NULL, NULL, MB_CUR_MAX);
+ n = mbtowc(NULL, NULL, MB_CUR_MAX);
return 0;
}
|
In an attempt to reproduce the error in PR #255.
Fixes an issue discovered while compiling using GCC 4.7 on Debian 7 by Jenz Guenther in #255.
Thanks, commited in 274969a. |
gcc-4.7.real (Debian 4.7.2-5) 4.7.2
withdpkg-buildflags
shows:
... looking at the code:
I don't understand why the second call to
mbtowc
is required here ...The text was updated successfully, but these errors were encountered: