Make the code base clean under -Wwrite-strings.

I've also added that warning option and -Werror to the build script,
so that I'll find out if I break this property in future.
This commit is contained in:
Simon Tatham
2017-10-01 14:45:12 +01:00
parent 3276376d1b
commit a58c1b216b
35 changed files with 107 additions and 96 deletions

4
grid.h
View File

@ -116,8 +116,8 @@ typedef enum grid_type { GRIDGEN_LIST(ENUM) GRID_TYPE_MAX } grid_type;
/* Free directly after use if non-NULL. Will never contain an underscore
* (so clients can safely use that as a separator). */
char *grid_new_desc(grid_type type, int width, int height, random_state *rs);
char *grid_validate_desc(grid_type type, int width, int height,
const char *desc);
const char *grid_validate_desc(grid_type type, int width, int height,
const char *desc);
grid *grid_new(grid_type type, int width, int height, const char *desc);