diff --git a/FLAC/FLAC.vcproj b/FLAC/FLAC.vcproj index 972d8070c..23a31f6b0 100644 --- a/FLAC/FLAC.vcproj +++ b/FLAC/FLAC.vcproj @@ -450,7 +450,7 @@ @@ -461,7 +461,7 @@ @@ -471,7 +471,7 @@ @@ -482,7 +482,7 @@ @@ -496,7 +496,7 @@ @@ -507,7 +507,7 @@ @@ -517,7 +517,7 @@ @@ -528,7 +528,7 @@ @@ -542,7 +542,7 @@ @@ -553,7 +553,7 @@ @@ -563,7 +563,7 @@ @@ -574,7 +574,7 @@ @@ -588,7 +588,7 @@ @@ -599,7 +599,7 @@ @@ -609,7 +609,7 @@ @@ -620,7 +620,7 @@ @@ -638,7 +638,7 @@ @@ -649,7 +649,7 @@ @@ -659,7 +659,7 @@ @@ -670,7 +670,7 @@ diff --git a/FLAC/Makefile.mgw b/FLAC/Makefile.mgw index 8021789b1..fe70e1f74 100644 --- a/FLAC/Makefile.mgw +++ b/FLAC/Makefile.mgw @@ -1,79 +1,79 @@ -# Makefile for combined FLAC, FLAC++, derived from zlib's Makefile.mgw, -# which was itself derived from zlib's Makefile.dj2. -# Modified for mingw32 by C. Spieler, 6/16/98. -# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003. -# Last updated: 1-Aug-2003. - -# Copyright (C) 1995-2003 Jean-loup Gailly. -# For conditions of distribution and use, see copyright notice in zlib.h - -ifeq (Windows_NT,$(OS)) - WIN=1 - WINCMD=1 -endif -ifeq (msys,$(OSTYPE)) - WIN=1 - WINCMD=0 -endif - -STATICLIB = libflac.a - -#LOC = -DASMV -#LOC = -DDEBUG -g - -DEFINES = -D__MINW32__ -DWIN32 -DNDEBUG -D_LIB -DFLAC__CPU_IA32 -DFLAC_HAS_NASM -DFLAC__SSE_OS -DFLAC__USE_3DNOW -DFLAC__NO_DLL -I. - -CCDV = @../ccdv -CC = gcc -CXX = g++ -CFLAGS = $(LOC) $(DEFINES) -O2 -Wall -Wno-unused-function -fomit-frame-pointer -CXXFLAGS = $(LOC) $(DEFINES) -O2 -Wall - -NASM = nasmw -NASMFLAGS = -d OBJ_FORMAT_win32 -f win32 - -AR = ar -ARFLAGS = rcs - -OBJS = cpu_asm.o fixed_asm.o lpc_asm.o \ - bitmath.o bitreader.o cpu.o crc.o fixed.o format.o lpc.o md5.o memory.o stream_decoder.o stream_decoder_pp.o - -all: $(STATICLIB) - -.c.o: - $(CCDV) $(CC) $(CFLAGS) -c -o $@ $< - -.cpp.o: - $(CCDV) $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(STATICLIB): $(OBJS) - $(CCDV) $(AR) $(ARFLAGS) $@ $(OBJS) - - -.PHONY: clean - -clean: -ifeq (1,$(WINCMD)) - -del /q /f $(STATICLIB) 2>nul - -del /q /f *.o 2>nul -else - rm -f $(STATICLIB) - rm -f *.o -endif - -cpu_asm.o: ia32/cpu_asm.nasm - $(CCDV) $(NASM) -o $@ $(NASMFLAGS) $< -fixed_asm.o: ia32/fixed_asm.nasm - $(CCDV) $(NASM) -o $@ $(NASMFLAGS) $< -lpc_asm.o: ia32/lpc_asm.nasm - $(CCDV) $(NASM) -o $@ $(NASMFLAGS) $< -bitbuffer.o: bitbuffer.c -bitmath.o: bitmath.c -cpu.o: cpu.c -crc.o: crc.c -fixed.o: fixed.c -format.o: format.c -lpc.o: lpc.c -memory.o: memory.c -stream_decoder.o: stream_decoder.c -stream_decoder_pp.o: stream_decoder_pp.cpp +# Makefile for combined FLAC, FLAC++, derived from zlib's Makefile.mgw, +# which was itself derived from zlib's Makefile.dj2. +# Modified for mingw32 by C. Spieler, 6/16/98. +# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003. +# Last updated: 1-Aug-2003. + +# Copyright (C) 1995-2003 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +ifeq (Windows_NT,$(OS)) + WIN=1 + WINCMD=1 +endif +ifeq (msys,$(OSTYPE)) + WIN=1 + WINCMD=0 +endif + +STATICLIB = libflac.a + +#LOC = -DASMV +#LOC = -DDEBUG -g + +DEFINES = -D__MINW32__ -DWIN32 -DNDEBUG -D_LIB -DFLAC__CPU_IA32 -DFLAC_HAS_NASM -DFLAC__SSE_OS -DFLAC__USE_3DNOW -DFLAC__NO_DLL -I. + +CCDV = @../ccdv +CC = gcc +CXX = g++ +CFLAGS = $(LOC) $(DEFINES) -O2 -Wall -Wno-unused-function -fomit-frame-pointer +CXXFLAGS = $(LOC) $(DEFINES) -O2 -Wall + +NASM = nasm +NASMFLAGS = -d OBJ_FORMAT_win32 -f win32 + +AR = ar +ARFLAGS = rcs + +OBJS = cpu_asm.o fixed_asm.o lpc_asm.o \ + bitmath.o bitreader.o cpu.o crc.o fixed.o format.o lpc.o md5.o memory.o stream_decoder.o stream_decoder_pp.o + +all: $(STATICLIB) + +.c.o: + $(CCDV) $(CC) $(CFLAGS) -c -o $@ $< + +.cpp.o: + $(CCDV) $(CXX) $(CXXFLAGS) -c -o $@ $< + +$(STATICLIB): $(OBJS) + $(CCDV) $(AR) $(ARFLAGS) $@ $(OBJS) + + +.PHONY: clean + +clean: +ifeq (1,$(WINCMD)) + -del /q /f $(STATICLIB) 2>nul + -del /q /f *.o 2>nul +else + rm -f $(STATICLIB) + rm -f *.o +endif + +cpu_asm.o: ia32/cpu_asm.nasm + $(CCDV) $(NASM) -o $@ $(NASMFLAGS) $< +fixed_asm.o: ia32/fixed_asm.nasm + $(CCDV) $(NASM) -o $@ $(NASMFLAGS) $< +lpc_asm.o: ia32/lpc_asm.nasm + $(CCDV) $(NASM) -o $@ $(NASMFLAGS) $< +bitbuffer.o: bitbuffer.c +bitmath.o: bitmath.c +cpu.o: cpu.c +crc.o: crc.c +fixed.o: fixed.c +format.o: format.c +lpc.o: lpc.c +memory.o: memory.c +stream_decoder.o: stream_decoder.c +stream_decoder_pp.o: stream_decoder_pp.cpp diff --git a/FLAC/ia32/bitreader_asm.nasm b/FLAC/ia32/bitreader_asm.nasm index 93c1196c2..f2b5464ff 100644 --- a/FLAC/ia32/bitreader_asm.nasm +++ b/FLAC/ia32/bitreader_asm.nasm @@ -561,7 +561,7 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap pop ebp ret -end +end: %ifdef OBJ_FORMAT_elf section .note.GNU-stack noalloc diff --git a/FLAC/ia32/cpu_asm.nasm b/FLAC/ia32/cpu_asm.nasm index 642ca19ea..38d1972a9 100644 --- a/FLAC/ia32/cpu_asm.nasm +++ b/FLAC/ia32/cpu_asm.nasm @@ -85,13 +85,13 @@ cident FLAC__cpu_info_asm_ia32 mov ebx, [esp + 12] mov [ebx], ecx jmp .end -.no_cpuid +.no_cpuid: xor eax, eax mov ebx, [esp + 8] mov [ebx], eax mov ebx, [esp + 12] mov [ebx], eax -.end +.end: pop ebx ret @@ -108,13 +108,13 @@ cident FLAC__cpu_info_extended_amd_asm_ia32 cpuid mov eax, edx jmp .end -.no_cpuid +.no_cpuid: xor eax, eax -.end +.end: pop ebx ret -end +end: %ifdef OBJ_FORMAT_elf section .note.GNU-stack noalloc diff --git a/FLAC/ia32/fixed_asm.nasm b/FLAC/ia32/fixed_asm.nasm index f639494b9..8851a5d17 100644 --- a/FLAC/ia32/fixed_asm.nasm +++ b/FLAC/ia32/fixed_asm.nasm @@ -305,7 +305,7 @@ cident FLAC__fixed_compute_best_predictor_asm_ia32_mmx_cmov pop ebp ret -end +end: %ifdef OBJ_FORMAT_elf section .note.GNU-stack noalloc diff --git a/FLAC/ia32/lpc_asm.nasm b/FLAC/ia32/lpc_asm.nasm index e8d02e5be..2ebc923a7 100644 --- a/FLAC/ia32/lpc_asm.nasm +++ b/FLAC/ia32/lpc_asm.nasm @@ -1504,7 +1504,7 @@ cident FLAC__lpc_restore_signal_asm_ia32_mmx pop ebp ret -end +end: %ifdef OBJ_FORMAT_elf section .note.GNU-stack noalloc diff --git a/FLAC/ia32/stream_encoder_asm.nasm b/FLAC/ia32/stream_encoder_asm.nasm index 8d4ef6f94..98ebe9a38 100644 --- a/FLAC/ia32/stream_encoder_asm.nasm +++ b/FLAC/ia32/stream_encoder_asm.nasm @@ -152,7 +152,7 @@ cident precompute_partition_info_sums_32bit_asm_ia32_ pop ebp ret -end +end: %ifdef OBJ_FORMAT_elf section .note.GNU-stack noalloc diff --git a/Makefile.mingw b/Makefile.mingw index 306a41cc0..6d8640892 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -90,7 +90,7 @@ $(OBJDIR)/%.o : %.cpp $(CCDV) $(CXX) $(CXXFLAGS) -o $@ -c $< $(OBJDIR)/%.o : %.nas - $(CCDV) nasmw -o $@ -f win32 $< + $(CCDV) nasm -o $@ -f win32 $< @tools/fixrtext/fixrtext $@ $(OBJDIR)/%.o : %.rc diff --git a/docs/rh-log.txt b/docs/rh-log.txt index bf6df028d..db1722f73 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,9 @@ +December 10, 2007 +- Fixed some more GCC warnings. +- Updated project files for nasm 2.0, which is now named nasm.exe for the + Windows version, rather than nasmw.exe. Also fixed the annoying new warnings + it generated. + December 10, 2007 (Changes by Graf Zahl) - Fixed: M_VerifyNightmare must use the selected skill level to start the game, not always 4. diff --git a/src/d_netinfo.cpp b/src/d_netinfo.cpp index 73900547b..cc1a6fb6c 100644 --- a/src/d_netinfo.cpp +++ b/src/d_netinfo.cpp @@ -611,6 +611,10 @@ void D_ReadUserInfoStrings (int i, BYTE **stream, bool update) infotype = j; } } + else + { // Shush, GCC. + value = NULL; + } switch (infotype) { diff --git a/src/g_level.cpp b/src/g_level.cpp index 7e11d481a..8af056baa 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -3166,7 +3166,7 @@ static void ParseSkill () break; } } - for(int i = 0; i < AllSkills.Size(); i++) + for(unsigned int i = 0; i < AllSkills.Size(); i++) { if (AllSkills[i].Name == skill.Name) { @@ -3222,7 +3222,7 @@ int G_SkillProperty(ESkillProperty prop) void G_VerifySkill() { - if (gameskill >= AllSkills.Size()) + if (gameskill >= (int)AllSkills.Size()) gameskill = AllSkills.Size()-1; else if (gameskill < 0) gameskill = 0; diff --git a/src/g_level.h b/src/g_level.h index 36dd70372..daf22cb98 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -141,7 +141,7 @@ struct level_info_s char *level_name; char fadetable[9]; SBYTE WallVertLight, WallHorizLight; - char *f1; + const char *f1; // TheDefaultLevelInfo initializes everything above this line. int musicorder; FCompressedMemFile *snapshot; @@ -240,7 +240,7 @@ struct level_locals_s SBYTE WallVertLight; // Light diffs for vert/horiz walls SBYTE WallHorizLight; - char *f1; + const char *f1; }; typedef struct level_locals_s level_locals_t; @@ -370,8 +370,7 @@ enum ESkillProperty SKILLP_AutoUseHealth, SKILLP_SpawnFilter, SKILLP_EasyBossBrain, - SKILLP_ACSReturn, - SKILLP_Confirm, + SKILLP_ACSReturn }; int G_SkillProperty(ESkillProperty prop); diff --git a/src/m_menu.cpp b/src/m_menu.cpp index 7efa8fe18..38e46fa07 100644 --- a/src/m_menu.cpp +++ b/src/m_menu.cpp @@ -426,7 +426,7 @@ void M_StartupSkillMenu(const char *playerclass) } } SkillDef.numitems = HexenSkillMenu.numitems = 0; - for(int i=0;iflags |= MF_SPECIAL; } -} \ No newline at end of file +} diff --git a/src/tmap.nas b/src/tmap.nas index 4ce36154a..e03df7163 100644 --- a/src/tmap.nas +++ b/src/tmap.nas @@ -811,7 +811,7 @@ _R_DrawFuzzColumnP_ASM: ; third loop: Do whatever is left -.chunked +.chunked: test esi,esi jle .savefuzzpos mov edx,[fuzzoffset+ecx*4] @@ -1347,7 +1347,7 @@ _rt_map4cols_asm1: .even and ebx,ebx jz .done -.loop +.loop: mov dl,[ebp] mov cl,[ebp+1] add ebp,8 @@ -1441,7 +1441,7 @@ _rt_map4cols_asm2: .even and ebx,ebx jz .done -.loop +.loop: mov dl,[ebp+3] mov ch,[esi+edx] mov dl,[ebp+2] diff --git a/src/tmap2.nas b/src/tmap2.nas index b3e6426b9..ef0b84d1e 100644 --- a/src/tmap2.nas +++ b/src/tmap2.nas @@ -382,7 +382,7 @@ StartDiv: fld st3 ; 1/z | u | v | v/z | 1/z | u/z fdivr dword [fp_1] ; z | u | v | v/z | 1/z | u/z -DrawFullSpan +DrawFullSpan: mov ecx,[start_v] mov edx,[start_u] @@ -589,7 +589,7 @@ CalcPartialSteps: mov esi,edx mov ebp,ecx -endloop +endloop: x10 shr ebp,26 m10 and esi,0xfc000000 diff --git a/src/win32/eaxedit.cpp b/src/win32/eaxedit.cpp index cedd40c4a..636b37b99 100644 --- a/src/win32/eaxedit.cpp +++ b/src/win32/eaxedit.cpp @@ -762,10 +762,11 @@ INT_PTR CALLBACK NewEAXProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) hDlg, NULL, g_hInst, NULL); if (ToolTip) { + char zero = '\0'; ti.cbSize = sizeof(ti); ti.uFlags = TTF_TRACK | TTF_TRANSPARENT; ti.hinst = g_hInst; - ti.lpszText = ""; + ti.lpszText = &zero; for (i = 0; i < 3; ++i) { ti.uId = i; diff --git a/src/win32/wrappers.nas b/src/win32/wrappers.nas index 8cd87560b..6754ff12b 100644 --- a/src/win32/wrappers.nas +++ b/src/win32/wrappers.nas @@ -34,6 +34,6 @@ IsDebuggerPresent_Check: test eax,eax jne near .itis mov eax,IsDebuggerPresent_No -.itis +.itis: mov [__imp__IsDebuggerPresent@0],eax jmp eax diff --git a/zdoom.vcproj b/zdoom.vcproj index a84d5d44b..1808526f2 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -4770,7 +4770,7 @@ @@ -4780,7 +4780,7 @@ @@ -4790,7 +4790,7 @@ @@ -4800,7 +4800,7 @@ @@ -4814,7 +4814,7 @@ @@ -4824,7 +4824,7 @@ @@ -4834,7 +4834,7 @@ @@ -4844,7 +4844,7 @@ @@ -4858,7 +4858,7 @@ @@ -4868,7 +4868,7 @@ @@ -4878,7 +4878,7 @@ @@ -4888,7 +4888,7 @@ @@ -4902,7 +4902,7 @@ @@ -4912,7 +4912,7 @@ @@ -4922,7 +4922,7 @@ @@ -4932,7 +4932,7 @@ @@ -4946,7 +4946,7 @@ @@ -4956,7 +4956,7 @@ @@ -4966,7 +4966,7 @@ @@ -4976,7 +4976,7 @@ @@ -5374,7 +5374,7 @@ @@ -5384,7 +5384,7 @@