mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-03 03:01:05 +03:00
configure.ac: enable -Wwrite-strings
As discussed in bug #185 [1], const strings should be protected from being overwritten. This change adds -Wwrite-strings to the compiler warning flags and fixes resulting warnings by making static strings const. [1] https://github.com/obgm/libcoap/issues/185
This commit is contained in:
1 parent
9f68329f70
commit
a2d263356e
6 files changed
+9
-8
No files matched your search
+2
-2
@@ -559,7 +559,7 @@ usage( const char *program, const char *version) {
|
||||
|
||||
typedef struct {
|
||||
unsigned char code;
|
||||
char *media_type;
|
||||
const char *media_type;
|
||||
} content_type_t;
|
||||
|
||||
static void
|
||||
@@ -968,7 +968,7 @@ cmdline_input_from_file(char *filename, str *buf) {
|
||||
|
||||
static method_t
|
||||
cmdline_method(char *arg) {
|
||||
static char *methods[] =
|
||||
static const char *methods[] =
|
||||
{ 0, "get", "post", "put", "delete", "fetch", "patch", "ipatch", 0};
|
||||
unsigned char i;
|
||||
|
||||
|
||||
Reference in new issue
Block a user