summaryrefslogtreecommitdiffstats
path: root/util/ich_descriptors_tool
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-07-25 19:12:31 -0600
committerNico Huber <nico.h@gmx.de>2019-10-04 14:35:20 +0000
commit4a84ec273a487c27f91bd3df70cbdf8894af70e1 (patch)
treefaee09346d0a195ac778befa68a87c5f669cfe22 /util/ich_descriptors_tool
parentde77ad4678cb33ca0b58edf89fab8113eb304bcd (diff)
downloadflashrom-4a84ec273a487c27f91bd3df70cbdf8894af70e1.tar.gz
flashrom-4a84ec273a487c27f91bd3df70cbdf8894af70e1.tar.bz2
flashrom-4a84ec273a487c27f91bd3df70cbdf8894af70e1.zip
tree: Enable -Wwrite-strings
When compiling, this warning gives string literals the type const char[] to help catch accidental modification (which is undefined behaviour). There currently aren't any instances of this in flashrom, so let's enable this warning to keep it that way. This requires adding const qualifiers to the declarations of several variables that work with string literals. Change-Id: I62d9bc194938a0c9a0e4cdff7ced8ea2e14cc1bc Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Reviewed-on: https://review.coreboot.org/c/flashrom/+/34577 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'util/ich_descriptors_tool')
-rw-r--r--util/ich_descriptors_tool/ich_descriptors_tool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/ich_descriptors_tool/ich_descriptors_tool.c b/util/ich_descriptors_tool/ich_descriptors_tool.c
index 2db0f62fe..6f13749b2 100644
--- a/util/ich_descriptors_tool/ich_descriptors_tool.c
+++ b/util/ich_descriptors_tool/ich_descriptors_tool.c
@@ -111,7 +111,7 @@ static void dump_files(const char *name, const uint32_t *buf, unsigned int len,
printf("\n");
}
-static void usage(char *argv[], char *error)
+static void usage(char *argv[], const char *error)
{
if (error != NULL) {
fprintf(stderr, "%s\n", error);