-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 when building on Windows with clang + cmake #932
Comments
I pushed a commit on the develop branch that should address all of those. Then again, maybe not, since I don't have a way to test it. Please give it try. Thanks. |
Commit 985a62d is broken:
Can it be reverted, please? |
@sezero Please complete your examination and let me know what else you believe is broken. Thanks. |
Verified that DJGPP build of test/minigzip.c is broken:
Same will be true whereever Speaking of djgpp, building libz already has warnings (not related to
Including diff --git a/gzguts.h b/gzguts.h
index bd0a6fe..afb14f1 100644
--- a/gzguts.h
+++ b/gzguts.h
@@ -44,6 +44,10 @@
# include <sys/stat.h>
#endif
+#if defined __DJGPP__
+# include <unistd.h>
+#endif
+
#if defined(_WIN32) && !defined(WIDECHAR)
# define WIDECHAR
#endif Verified that WinCE build is broken. Using a mingw-based toolchain, for e.g.:
However, even if I back out the changes from that commit, it's still I have nothing else, at the moment. |
Sorry, still seeing warnings with clang 16 on Windows -- it ships with Visual Studio. All is fine on Linux with clang 16.
|
Possibly the best solution for those warnings is disabling them, like: #if defined _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif If, e.g. |
Yet it appears that DJGPP is definining |
Yes, that's what I did for the library, but I missed example.c and minigzip.c. |
@pmqs Ok, how about now? |
Most certainly not |
That's fine now. Updating the workflow to use this clang + cmake on MSVC |
@sezero Can you provide the output on DJGPP of |
|
@sezero Please give the develop branch a try on DJGPP. |
llseek is prototyped like this:
And The warnings are due to |
@sezero Please try applying this diff:
and if you're using configure or cmake, then also apply it to zconf.h.in or zconf.h.cmakein respectively. |
No, I am trying with the plain makefile |
@sezero Thanks. That exposed an inconsistency between header files which has been corrected. Please try the develop branch on DJGPP and let me know how it goes. Thanks. |
Thanks for working on this. With current HEAD, I get the following warnings now:
|
Are you giving me all of the warnings each time? I was surprised to see those warnings about the type of a |
Yes
Yes, and I am not activating it myself: -Wconversion is in msdos/Makefile.dj2, removing it was my original suggestion. |
Ah, ok. I will remove that warning option. It is truly odd that nothing changed to make those |
Question about |
@sezero Thanks. Is there an alternative to |
I tried with the one from here: https://max.kellermann.name/projects/cegcc/
As I understand it (not sure though) after looking at non-microsoft solutions, |
Not sure if this is intended to be a supported combination, but a Windows build using
clang
&cmake
spits out plenty of Compiler warningsThe text was updated successfully, but these errors were encountered: