Feedback about compiling with Cygwin on Win 8.1

Hello,
This is just a feedback of how ioquake3 currently compiles using latest Cygwin packages on Windows 8.1.
Well, this shows a few warnings when compiling the latest source code of ioquake3 (SVN 3525), so this might be interesting for developers as well. I don’t want to open a ticket on the issue tracker for the warnings, because I think the warnings will not harm anything.
Anyways the source code compiles without errors, and the compiling process produces dlls, qvms and exes (32 bit and 64 bit) as well. In other words 100% success! In consideration of other projects this is not a matter of course. Dealing with MSVC, cmake or Msys is hard and in the case of Msys I’m totally lost and can’t even say where to get Msys.

So in other words, THANK YOU to all ioquake3 maintainers/developers that keep ioquake3 compilable!

Here are the warnings:

Building in build/release-mingw32-x86_64:
PLATFORM: mingw32
ARCH: x86_64
VERSION: 1.36
COMPILE_PLATFORM: cygwin
COMPILE_ARCH: x86_64
HAVE_VM_COMPILED: true
PKG_CONFIG: unknown-pkg-config
CC: /usr/bin/x86_64-w64-mingw32-gcc
WINDRES: /usr/bin/x86_64-w64-mingw32-windres

CFLAGS:
-Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -DUSE_ICON
-DWINVER=0x501 -m64 -DNO_GZIP -Icode/zlib -DUSE_INTERNAL_JPEG
-Icode/jpeg-8c -DUSE_LOCAL_HEADERS -DPRODUCT_VERSION=“1.36” -Wformat=2
-Wno-format-zero-length -Wformat-security -Wno-format-nonliteral
-Wstrict-aliasing=2 -Wmissing-format-attribute -Wdisabled-optimization
-Werror-implicit-function-declaration -MMD -DNDEBUG -O3 -ffast-math

CLIENT_CFLAGS:
-DCURL_STATICLIB -Icode/SDL2/include -DUSE_OPENAL
-DUSE_OPENAL_DLOPEN -DUSE_CURL -DUSE_VOIP -DUSE_CODEC_OPUS
-DOPUS_BUILD -DHAVE_LRINTF -DFLOATING_POINT -DFLOAT_APPROX -DUSE_ALLOCA
-Icode/opus-1.2.1/include -Icode/opus-1.2.1/celt -Icode/opus-1.2.1/silk
-Icode/opus-1.2.1/silk/float -Icode/opusfile-0.9/include -DUSE_CODEC_VORBIS
-Icode/libvorbis-1.3.6/include -Icode/libvorbis-1.3.6/lib
-Icode/libogg-1.3.3/include -DUSE_RENDERER_DLOPEN -DUSE_MUMBLE

SERVER_CFLAGS:
-DUSE_VOIP

LDFLAGS:

LIBS:
-lws2_32 -lwinmm -lpsapi

CLIENT_LIBS:
-lgdi32 -lole32 code/libs/win64/libcurl.a -lcrypt32 -lmingw32
code/libs/win64/libSDL264main.a code/libs/win64/libSDL264.dll.a

AUTOUPDATER_LIBS:
-lwininet

Output:
ioq3ded.x86_64.exe
ioquake3.x86_64.exe
renderer_opengl1_x86_64.dll
renderer_opengl2_x86_64.dll
baseq3/cgamex86_64.dll
baseq3/qagamex86_64.dll
baseq3/uix86_64.dll
missionpack/cgamex86_64.dll
missionpack/qagamex86_64.dll
missionpack/uix86_64.dll
baseq3/vm/cgame.qvm
baseq3/vm/qagame.qvm
baseq3/vm/ui.qvm
missionpack/vm/cgame.qvm
missionpack/vm/qagame.qvm
missionpack/vm/ui.qvm
SDL264.dll

QCOMMON:

CC code/qcommon/q_shared.c
code/qcommon/q_shared.c: In function ‘Q_vsnprintf’:
code/qcommon/q_shared.c:786:2: warning: function might be possible candidate for ‘ms_printf’ format attribute [-Wsuggest-attribute=format]
retval = _vsnprintf(str, size, format, ap);
^
CC code/qcommon/unzip.c

OPUSFILE-0.9 (EXTERNAL LIBRARY):

CC code/opusfile-0.9/src/opusfile.c
code/opusfile-0.9/src/opusfile.c: In function ‘op_pcm_seek’:
code/opusfile-0.9/src/opusfile.c:2509:13: warning: ‘diff’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if(diff>48000)break;
^
code/opusfile-0.9/src/opusfile.c:2261:22: note: ‘diff’ was declared here
ogg_int64_t diff;
^
code/opusfile-0.9/src/opusfile.c:2399:21: warning: ‘diff2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ogg_int64_t diff2;
^
CC code/opusfile-0.9/src/stream.c

RENDERER GL1:

REF_CC code/renderergl1/tr_model_iqm.c
code/renderergl1/tr_model_iqm.c: In function ‘RB_IQMSurfaceAnim’:
code/renderergl1/tr_model_iqm.c:1303:36: warning: ‘blendWeights[3]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
vtxMat[11] += blendWeights[j] * poseMats[12 * data->influenceBlendIndexes[4influence + j] + 11];
^
REF_CC code/renderercommon/tr_noise.c

RENDERER GL2:

REF_CC code/renderergl2/tr_model_iqm.c
code/renderergl2/tr_model_iqm.c: In function ‘RB_IQMSurfaceAnim’:
code/renderergl2/tr_model_iqm.c:1485:36: warning: ‘blendWeights[3]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
vtxMat[11] += blendWeights[j] * poseMats[12 * data->influenceBlendIndexes[4
influence + j] + 11];
^
REF_CC code/renderercommon/tr_noise.c

TOOLS:

TOOLS_CC code/tools/lcc/src/bytecode.c
code/tools/lcc/src/bytecode.c: In function ‘b_defconst’:
code/tools/lcc/src/bytecode.c:40:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
case P: print(“byte %d %U\n”, size, (unsigned long)v.p); return;
^
TOOLS_CC code/tools/lcc/src/dag.c
code/tools/lcc/src/dag.c: In function ‘node’:
code/tools/lcc/src/dag.c:56:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
i = (opindex(op)^((unsigned long)sym>>2))&(NELEMS(buckets)-1);
^
TOOLS_CC code/tools/lcc/lburg/lburg.c

TOOLS_CC code/tools/lcc/src/output.c
code/tools/lcc/src/output.c: In function ‘vfprint’:
code/tools/lcc/src/output.c:92:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
bp = outu((unsigned long)p, 16, f, bp);
^
TOOLS_CC code/tools/lcc/src/prof.c
TOOLS_CC code/tools/lcc/src/profio.c
TOOLS_CC code/tools/lcc/src/simp.c
code/tools/lcc/src/simp.c: In function ‘simplify’:
code/tools/lcc/src/simp.c:233:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
xcvtcnst(P,(unsigned long)l->u.v.p,ty,u,(unsigned long)l->u.v.p);
^
code/tools/lcc/src/simp.c:20:9: note: in definition of macro ‘xcvtcnst’
&& ((SRC) < DST->u.sym->u.limits.min.VAR || (SRC) > DST->u.sym->u.limits.max.VAR))
^
code/tools/lcc/src/simp.c:233:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
xcvtcnst(P,(unsigned long)l->u.v.p,ty,u,(unsigned long)l->u.v.p);
^
code/tools/lcc/src/simp.c:20:49: note: in definition of macro ‘xcvtcnst’
&& ((SRC) < DST->u.sym->u.limits.min.VAR || (SRC) > DST->u.sym->u.limits.max.VAR))
^
code/tools/lcc/src/simp.c:233:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
xcvtcnst(P,(unsigned long)l->u.v.p,ty,u,(unsigned long)l->u.v.p);
^
code/tools/lcc/src/simp.c:23:9: note: in definition of macro ‘xcvtcnst’
|| !((SRC) < DST->u.sym->u.limits.min.VAR || (SRC) > DST->u.sym->u.limits.max.VAR))
^
code/tools/lcc/src/simp.c:233:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
xcvtcnst(P,(unsigned long)l->u.v.p,ty,u,(unsigned long)l->u.v.p);
^
code/tools/lcc/src/simp.c:23:49: note: in definition of macro ‘xcvtcnst’
|| !((SRC) < DST->u.sym->u.limits.min.VAR || (SRC) > DST->u.sym->u.limits.max.VAR))
^
code/tools/lcc/src/simp.c:233:44: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
xcvtcnst(P,(unsigned long)l->u.v.p,ty,u,(unsigned long)l->u.v.p);
^
code/tools/lcc/src/simp.c:24:25: note: in definition of macro ‘xcvtcnst’
return cnsttree(ty, (EXPR)); } while(0)
^
code/tools/lcc/src/simp.c:236:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
xcvtcnst(U,(void*)l->u.v.u,ty,p,(void*)l->u.v.u);
^
code/tools/lcc/src/simp.c:20:9: note: in definition of macro ‘xcvtcnst’
&& ((SRC) < DST->u.sym->u.limits.min.VAR || (SRC) > DST->u.sym->u.limits.max.VAR))
^
code/tools/lcc/src/simp.c:236:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
xcvtcnst(U,(void*)l->u.v.u,ty,p,(void*)l->u.v.u);
^
code/tools/lcc/src/simp.c:20:49: note: in definition of macro ‘xcvtcnst’
&& ((SRC) < DST->u.sym->u.limits.min.VAR || (SRC) > DST->u.sym->u.limits.max.VAR))
^
code/tools/lcc/src/simp.c:236:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
xcvtcnst(U,(void*)l->u.v.u,ty,p,(void*)l->u.v.u);
^
code/tools/lcc/src/simp.c:23:9: note: in definition of macro ‘xcvtcnst’
|| !((SRC) < DST->u.sym->u.limits.min.VAR || (SRC) > DST->u.sym->u.limits.max.VAR))
^
code/tools/lcc/src/simp.c:236:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
xcvtcnst(U,(void*)l->u.v.u,ty,p,(void*)l->u.v.u);
^
code/tools/lcc/src/simp.c:23:49: note: in definition of macro ‘xcvtcnst’
|| !((SRC) < DST->u.sym->u.limits.min.VAR || (SRC) > DST->u.sym->u.limits.max.VAR))
^
code/tools/lcc/src/simp.c:236:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
xcvtcnst(U,(void*)l->u.v.u,ty,p,(void*)l->u.v.u);
^
code/tools/lcc/src/simp.c:24:25: note: in definition of macro ‘xcvtcnst’
return cnsttree(ty, (EXPR)); } while(0)
^
TOOLS_CC code/tools/lcc/src/stmt.c
TOOLS_CC code/tools/lcc/src/string.c
TOOLS_CC code/tools/lcc/src/sym.c
code/tools/lcc/src/sym.c: In function ‘install’:
code/tools/lcc/src/sym.c:83:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
unsigned h = (unsigned long)name&(HASHSIZE-1);
^
code/tools/lcc/src/sym.c: In function ‘relocate’:
code/tools/lcc/src/sym.c:100:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
unsigned h = (unsigned long)name&(HASHSIZE-1);
^
code/tools/lcc/src/sym.c: In function ‘lookup’:
code/tools/lcc/src/sym.c:129:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
unsigned h = (unsigned long)name&(HASHSIZE-1);
^
TOOLS_CC code/tools/lcc/src/symbolic.c
TOOLS_CC code/tools/lcc/src/trace.c
TOOLS_CC code/tools/lcc/src/tree.c
TOOLS_CC code/tools/lcc/src/types.c
code/tools/lcc/src/types.c: In function ‘type’:
code/tools/lcc/src/types.c:68:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
unsigned h = (op^((unsigned long)ty>>3))
^
code/tools/lcc/src/types.c: In function ‘type_init’:
code/tools/lcc/src/types.c:141:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
pointersym->u.limits.max.p = (void*)ones(8*IR->ptrmetric.size);
^
LD build/release-mingw32-x86_64/tools/q3rcc.exe
TOOLS_CC code/tools/lcc/cpp/cpp.c

Okay I’m not sure if this is of some interest. As far as I know warnings in external libraries aren’t worth to care about. The warnings in qcommon and in the renderer(s) are maybe worth to have a closer look at.

Again, thanks for keeping ioquake3 alive!