]> granicus.if.org Git - graphviz/commitdiff
mingle: convert usage text to a const char array
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 25 Dec 2021 19:26:32 +0000 (11:26 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 4 Jan 2022 15:56:35 +0000 (07:56 -0800)
This makes the intent of the code slightly clearer, but also pre-emptively
avoids an upcoming -Wwrite-strings warning when converting this code to C++.

Related to #2154.

cmd/mingle/minglemain.c

index 75ce8600575e818453d583c5c5ef638a98c799ef..4208425cefc2bec62666b0524a4993d94a6b92d3 100644 (file)
@@ -60,7 +60,7 @@ static FILE *openFile(const char *name, const char* cmd)
        return (fp);
 }
 
-static char* use_msg =
+static const char use_msg[] =
 "Usage: mingle <options> <file>\n\
     -a t - max. turning angle [0-180] (40)\n\
     -c i - compatability measure; 0 : distance, 1: full (default)\n\