mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
[qfcc] Clean up warning and notice return types
They never needed to return expr.
This commit is contained in:
parent
1df7674c65
commit
b9aad99381
3 changed files with 8 additions and 10 deletions
|
@ -54,13 +54,13 @@ void _internal_error (const expr_t *e, const char *file, int line,
|
|||
__attribute__ ((format (PRINTF, 5, 6), noreturn));
|
||||
#define internal_error(e, fmt...) _internal_error(e, __FILE__, __LINE__, __FUNCTION__, fmt)
|
||||
|
||||
const expr_t *_warning (const expr_t *e, const char *file,
|
||||
int line, const char *func, const char *fmt, ...)
|
||||
void _warning (const expr_t *e, const char *file, int line, const char *func,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (PRINTF, 5, 6)));
|
||||
#define warning(e, fmt...) _warning(e, __FILE__, __LINE__, __FUNCTION__, fmt)
|
||||
|
||||
const expr_t *_notice (const expr_t *e, const char *file,
|
||||
int line, const char *func, const char *fmt, ...)
|
||||
void _notice (const expr_t *e, const char *file, int line, const char *func,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (PRINTF, 5, 6)));
|
||||
#define notice(e, fmt...) _notice(e, __FILE__, __LINE__, __FUNCTION__, fmt)
|
||||
|
||||
|
|
|
@ -208,14 +208,14 @@ _bug (const expr_t *e, const char *file, int line, const char *func,
|
|||
va_end (args);
|
||||
}
|
||||
|
||||
const expr_t *
|
||||
const void
|
||||
_notice (const expr_t *e, const char *file, int line, const char *func,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
if (options.notices.silent)
|
||||
return e;
|
||||
return;
|
||||
|
||||
va_start (args, fmt);
|
||||
if (options.notices.promote) {
|
||||
|
@ -237,10 +237,9 @@ _notice (const expr_t *e, const char *file, int line, const char *func,
|
|||
dstring_delete (message);
|
||||
}
|
||||
va_end (args);
|
||||
return e;
|
||||
}
|
||||
|
||||
const expr_t *
|
||||
const void
|
||||
_warning (const expr_t *e, const char *file, int line, const char *func,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
|
@ -249,7 +248,6 @@ _warning (const expr_t *e, const char *file, int line, const char *func,
|
|||
va_start (args, fmt);
|
||||
__warning (e, file, line, func, fmt, args);
|
||||
va_end (args);
|
||||
return e;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -55,7 +55,7 @@ void codespace_addcode (codespace_t *codespace, struct dstatement_s *code, int s
|
|||
__attribute__((const)) int function_parms (function_t *f, byte *parm_size) {return 0;}
|
||||
void def_to_ddef (def_t *def, ddef_t *ddef, int aux) {}
|
||||
__attribute__((noreturn)) void _internal_error (const expr_t *e, const char *file, int line, const char *func, const char *fmt, ...) {abort();}
|
||||
__attribute__((const)) const expr_t *_warning (const expr_t *e, const char *file, int line, const char *func, const char *fmt, ...) {return 0;}
|
||||
void _warning (const expr_t *e, const char *file, int line, const char *func, const char *fmt, ...) {}
|
||||
__attribute__((const)) const expr_t *_error (const expr_t *e, const char *file, int line, const char *func, const char *fmt, ...) {return 0;}
|
||||
__attribute__((const)) symbol_t *make_structure (const char *name, int su, struct_def_t *defs, const type_t *type) {return 0;}
|
||||
__attribute__((const)) symbol_t *symtab_addsymbol (symtab_t *symtab, symbol_t *symbol) {return 0;}
|
||||
|
|
Loading…
Reference in a new issue