mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-08-03 12:47:01 -04:00
linter fixes (#1719)
* use cpp-linter action * fix header files * disable clang-analyzer-valist checks * remove unused values * the value is never read from `scale`
This commit is contained in:
parent
6ff39793ad
commit
477fc429bf
21
.github/workflows/main.yml
vendored
21
.github/workflows/main.yml
vendored
@ -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'
|
||||
|
@ -18,6 +18,8 @@
|
||||
#ifndef __I_GLOB__
|
||||
#define __I_GLOB__
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#define GLOB_FLAG_NOCASE 0x01
|
||||
#define GLOB_FLAG_SORTED 0x02
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ void R_InitLightTables (void)
|
||||
for (j=0; j<MAXLIGHTZ; j++)
|
||||
{
|
||||
int scale = FixedDiv ((SCREENWIDTH/2*FRACUNIT), (j+1)<<LIGHTZSHIFT);
|
||||
int t, level = startmap - (scale >>= LIGHTSCALESHIFT)/DISTMAP;
|
||||
int t, level = startmap - (scale >> LIGHTSCALESHIFT)/DISTMAP;
|
||||
|
||||
if (level < 0)
|
||||
level = 0;
|
||||
|
@ -2,6 +2,8 @@
|
||||
Please see textscreen/fonts/README for copyright
|
||||
information. */
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
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,
|
||||
};
|
||||
|
@ -30,6 +30,8 @@
|
||||
* Input box widgets can be of an integer or string type.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
typedef struct txt_inputbox_s txt_inputbox_t;
|
||||
|
||||
#include "txt_widget.h"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user