diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58d7b199..63f32735 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -164,7 +164,20 @@ jobs: - name: Run Clang-Tidy if: ${{ matrix.name == 'Clang-Tidy' }} - run: | - run-clang-tidy -j4 -quiet \ - -checks="-*,clang-analyzer-*,-clang-analyzer-cplusplus*,-clang-analyzer-security*" \ - -p build + uses: cpp-linter/cpp-linter-action@v2 + id: cpp-linter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + version: 18 + step-summary: true + files-changed-only: false + style: '' # disable clang-format checks. + tidy-checks: >- + -* + ,clang-analyzer-* + ,-clang-analyzer-cplusplus* + ,-clang-analyzer-security* + ,-clang-analyzer-valist* + database: 'build' + ignore: 'miniz|spng|win32|toolsrc|src/i_pcsound.c' diff --git a/src/i_glob.h b/src/i_glob.h index 385e8cf8..bf266280 100644 --- a/src/i_glob.h +++ b/src/i_glob.h @@ -18,6 +18,8 @@ #ifndef __I_GLOB__ #define __I_GLOB__ +#include + #define GLOB_FLAG_NOCASE 0x01 #define GLOB_FLAG_SORTED 0x02 diff --git a/src/mn_menu.c b/src/mn_menu.c index ac3983a0..1dbec4ea 100644 --- a/src/mn_menu.c +++ b/src/mn_menu.c @@ -1530,8 +1530,6 @@ static void M_EndGame(int choice) static void M_ChangeMessages(int choice) { - // warning: unused parameter `int choice' - choice = 0; show_messages = 1 - show_messages; if (!show_messages) @@ -1622,7 +1620,6 @@ static menu_t ExtHelpDef = { static void M_ExtHelpNextScreen(int choice) { - choice = 0; if (++extended_help_index > extended_help_count) { @@ -1672,7 +1669,6 @@ static void M_InitExtendedHelp(void) static void M_ExtHelp(int choice) { - choice = 0; extended_help_index = 1; // Start with first extended help screen SetNextMenu(&ExtHelpDef); } diff --git a/src/r_main.c b/src/r_main.c index 9c0a0087..cd5c832b 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -452,7 +452,7 @@ void R_InitLightTables (void) for (j=0; j>= LIGHTSCALESHIFT)/DISTMAP; + int t, level = startmap - (scale >> LIGHTSCALESHIFT)/DISTMAP; if (level < 0) level = 0; diff --git a/textscreen/fonts/normal.h b/textscreen/fonts/normal.h index 8b6d20ed..174a7642 100644 --- a/textscreen/fonts/normal.h +++ b/textscreen/fonts/normal.h @@ -2,6 +2,8 @@ Please see textscreen/fonts/README for copyright information. */ +#include + static const uint8_t normal_font_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -517,8 +519,3 @@ static const uint8_t normal_font_data[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; - -static const txt_font_t normal_font = -{ - "normal", normal_font_data, 8, 16, -}; diff --git a/textscreen/txt_inputbox.h b/textscreen/txt_inputbox.h index 344d9eee..08a6ff65 100644 --- a/textscreen/txt_inputbox.h +++ b/textscreen/txt_inputbox.h @@ -30,6 +30,8 @@ * Input box widgets can be of an integer or string type. */ +#include + typedef struct txt_inputbox_s txt_inputbox_t; #include "txt_widget.h" diff --git a/textscreen/txt_sdl.c b/textscreen/txt_sdl.c index 581f777b..b82d061c 100644 --- a/textscreen/txt_sdl.c +++ b/textscreen/txt_sdl.c @@ -44,6 +44,12 @@ typedef struct // Fonts: #include "fonts/normal.h" + +static const txt_font_t normal_font = +{ + "normal", normal_font_data, 8, 16, +}; + #include "fonts/codepage.h" // Time between character blinks in ms