Standardize on "east const" (type const * not const type *)

Avoid "WARNING: Move const after static - use 'static const char'"
This commit is contained in:
Rangi
2021-11-17 23:01:58 -05:00
committed by Eldred Habert
parent efccf6c931
commit 3e945679ad
17 changed files with 64 additions and 59 deletions

View File

@@ -45,7 +45,7 @@
#ifdef __SANITIZE_ADDRESS__
// There are known, non-trivial to fix leaks. We would still like to have `make develop'
// detect memory corruption, though.
const char *__asan_default_options(void) { return "detect_leaks=0"; }
char const *__asan_default_options(void) { return "detect_leaks=0"; }
#endif
// Old Bison versions (confirmed for 2.3) do not forward-declare `yyparse` in the generated header
@@ -68,7 +68,7 @@ bool verbose;
bool warnings; /* True to enable warnings, false to disable them. */
/* Escapes Make-special chars from a string */
static char *make_escape(const char *str)
static char *make_escape(char const *str)
{
char * const escaped_str = malloc(strlen(str) * 2 + 1);
char *dest = escaped_str;