Resolve -Wstrict-prototypes warnings with clang-15
warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
This commit is contained in:
parent
4dd285fad7
commit
6c4010e442
15 changed files with 34 additions and 34 deletions
|
|
@ -1356,14 +1356,14 @@ static void add_chunk(DOH *ns, DOH *chunk, int allow) {
|
|||
push/pop_imported(): helper functions for defining and undefining
|
||||
SWIGIMPORTED (when %importing a file).
|
||||
*/
|
||||
static void push_imported() {
|
||||
static void push_imported(void) {
|
||||
if (imported_depth == 0) {
|
||||
Preprocessor_define("SWIGIMPORTED 1", 0);
|
||||
}
|
||||
++imported_depth;
|
||||
}
|
||||
|
||||
static void pop_imported() {
|
||||
static void pop_imported(void) {
|
||||
--imported_depth;
|
||||
if (imported_depth == 0) {
|
||||
Preprocessor_undef("SWIGIMPORTED");
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static int expr_init = 0; /* Initialization flag */
|
|||
static const char *errmsg = 0; /* Parsing error */
|
||||
|
||||
/* Initialize the precedence table for various operators. Low values have higher precedence */
|
||||
static void init_precedence() {
|
||||
static void init_precedence(void) {
|
||||
prec[SWIG_TOKEN_NOT] = 10;
|
||||
prec[OP_UMINUS] = 10;
|
||||
prec[OP_UPLUS] = 10;
|
||||
|
|
@ -85,7 +85,7 @@ static void init_precedence() {
|
|||
|
||||
/* Reduce a single operator on the stack */
|
||||
/* return 0 on failure, 1 on success */
|
||||
static int reduce_op() {
|
||||
static int reduce_op(void) {
|
||||
long op_token = stack[sp - 1].value;
|
||||
assert(sp > 0);
|
||||
assert(stack[sp - 1].op == EXPR_OP);
|
||||
|
|
@ -474,6 +474,6 @@ extra_rparen:
|
|||
* Return error message set by the evaluator (if any)
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
const char *Preprocessor_expr_error() {
|
||||
const char *Preprocessor_expr_error(void) {
|
||||
return errmsg;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue