mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 12:00:38 +00:00
Apply some static where it belongs
This commit is contained in:
parent
1b5504fb9e
commit
10dd7aacfe
7 changed files with 12 additions and 13 deletions
1
Makefile
1
Makefile
|
@ -29,7 +29,6 @@ ifeq ($(CC), clang)
|
|||
-Wno-conversion \
|
||||
-Wno-missing-prototypes \
|
||||
-Wno-float-equal \
|
||||
-Wno-missing-variable-declarations \
|
||||
-Wno-unknown-warning-option
|
||||
else
|
||||
#Tiny C Compiler doesn't know what -pedantic-errors is
|
||||
|
|
2
code.c
2
code.c
|
@ -31,7 +31,7 @@ prog_section_function *code_functions;
|
|||
int *code_globals;
|
||||
char *code_chars;
|
||||
uint16_t code_crc;
|
||||
uint32_t code_entfields;
|
||||
static uint32_t code_entfields;
|
||||
|
||||
/* This is outrageous! */
|
||||
#define QCINT_ENTRY void*
|
||||
|
|
2
exec.c
2
exec.c
|
@ -625,7 +625,7 @@ typedef struct {
|
|||
const char *value;
|
||||
} qcvm_parameter;
|
||||
|
||||
qcvm_parameter *main_params = NULL;
|
||||
static qcvm_parameter *main_params = NULL;
|
||||
|
||||
#define CheckArgs(num) do { \
|
||||
if (prog->argc != (num)) { \
|
||||
|
|
2
ir.c
2
ir.c
|
@ -48,7 +48,7 @@ const char *type_name[TYPE_COUNT] = {
|
|||
"<no-expression>"
|
||||
};
|
||||
|
||||
size_t type_sizeof_[TYPE_COUNT] = {
|
||||
static size_t type_sizeof_[TYPE_COUNT] = {
|
||||
1, /* TYPE_VOID */
|
||||
1, /* TYPE_STRING */
|
||||
1, /* TYPE_FLOAT */
|
||||
|
|
2
lexer.c
2
lexer.c
|
@ -58,7 +58,7 @@ static size_t num_keywords_fg = sizeof(keywords_fg) / sizeof(keywords_fg[0]);
|
|||
* Lexer code
|
||||
*/
|
||||
|
||||
char* *lex_filenames;
|
||||
static char* *lex_filenames;
|
||||
|
||||
void lexerror(lex_file *lex, const char *fmt, ...)
|
||||
{
|
||||
|
|
4
test.c
4
test.c
|
@ -26,7 +26,7 @@
|
|||
|
||||
opts_cmd_t opts;
|
||||
|
||||
const char *task_bins[] = {
|
||||
static const char *task_bins[] = {
|
||||
"./gmqcc",
|
||||
"./qcvm"
|
||||
};
|
||||
|
@ -654,7 +654,7 @@ typedef struct {
|
|||
bool compiled;
|
||||
} task_t;
|
||||
|
||||
task_t *task_tasks = NULL;
|
||||
static task_t *task_tasks = NULL;
|
||||
|
||||
/*
|
||||
* Read a directory and searches for all template files in it
|
||||
|
|
12
util.c
12
util.c
|
@ -26,12 +26,12 @@
|
|||
#include "gmqcc.h"
|
||||
|
||||
/* TODO: remove globals ... */
|
||||
uint64_t mem_ab = 0;
|
||||
uint64_t mem_db = 0;
|
||||
uint64_t mem_at = 0;
|
||||
uint64_t mem_dt = 0;
|
||||
uint64_t mem_pk = 0;
|
||||
uint64_t mem_hw = 0;
|
||||
static uint64_t mem_ab = 0;
|
||||
static uint64_t mem_db = 0;
|
||||
static uint64_t mem_at = 0;
|
||||
static uint64_t mem_dt = 0;
|
||||
static uint64_t mem_pk = 0;
|
||||
static uint64_t mem_hw = 0;
|
||||
|
||||
struct memblock_t {
|
||||
const char *file;
|
||||
|
|
Loading…
Reference in a new issue