mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
enable -Werror option (#631)
* enable -Werror option, set sprintf format * change buffer size * fix syntax error * enable /WX option for MSVC
This commit is contained in:
parent
bcf5410d3d
commit
5e9eb7434e
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
- name: Configure
|
||||
env:
|
||||
CC: ${{ matrix.compiler }}
|
||||
run: cmake -B build -G "Ninja"
|
||||
run: cmake -B build -G "Ninja" -DENABLE_WERROR=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
@ -77,7 +77,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Configure
|
||||
run: cmake -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release
|
||||
run: cmake -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DENABLE_WERROR=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
@ -100,7 +100,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Configure
|
||||
run: cmake -B build -T v141_xp -A Win32
|
||||
run: cmake -B build -T v141_xp -A Win32 -DENABLE_WERROR=ON
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
|
@ -40,9 +40,6 @@ if(MSVC)
|
||||
# Default warning setting for MSVC.
|
||||
_checked_add_compile_option(/W3)
|
||||
|
||||
# Treat all warnings as errors.
|
||||
_checked_add_compile_option(/WX)
|
||||
|
||||
# Extra warnings for cl.exe.
|
||||
_checked_add_compile_option(/we4013) # Implicit function declaration.
|
||||
_checked_add_compile_option(/we4133) # Incompatible types.
|
||||
@ -67,6 +64,9 @@ endif()
|
||||
option(ENABLE_WERROR "Treat warnings as errors" OFF)
|
||||
if(ENABLE_WERROR)
|
||||
_checked_add_compile_option(-Werror)
|
||||
if(MSVC)
|
||||
_checked_add_compile_option(/WX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${FORCE_COLORED_OUTPUT})
|
||||
|
@ -1931,7 +1931,7 @@ void WI_Ticker(void)
|
||||
|
||||
void WI_DrawBackground(void)
|
||||
{
|
||||
char name[9];
|
||||
char name[32];
|
||||
|
||||
if (state != StatCount && enterpic)
|
||||
strcpy(name, enterpic);
|
||||
|
Loading…
x
Reference in New Issue
Block a user