Skip to content

Commit 33091a1

Browse files
committed
Fix -Wwritable-strings in compiler/infra
Fix -Wwritable-strings in compiler/infra Signed-off-by: Dylan Tuttle <[email protected]>
1 parent fa811ca commit 33091a1

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

compiler/infra/InterferenceGraph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ bool TR_InterferenceGraph::select()
503503

504504

505505
#ifdef DEBUG
506-
void TR_InterferenceGraph::dumpIG(char *msg)
506+
void TR_InterferenceGraph::dumpIG(const char *msg)
507507
{
508508
if (msg)
509509
{

compiler/infra/InterferenceGraph.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ class TR_InterferenceGraph : public TR_IGBase
144144
IGNodeColour findMinimumChromaticNumber();
145145

146146
#ifdef DEBUG
147-
void dumpIG(char *msg = NULL);
147+
void dumpIG(const char *msg = NULL);
148148
#else
149-
void dumpIG(char *msg = NULL) {}
149+
void dumpIG(const char *msg = NULL) {}
150150
#endif
151151
};
152152
#endif

compiler/infra/SimpleRegex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
namespace TR
5656
{
5757

58-
SimpleRegex *SimpleRegex::create(char *&s)
58+
SimpleRegex *SimpleRegex::create(char *& s)
5959
{
6060
if (s == NULL || s[0] != '{')
6161
return NULL;
62-
char *origStr = s;
62+
const char *origStr = s;
6363
++s;
6464
bool negate = (s[0] == '^');
6565
if (negate)

compiler/infra/SimpleRegex.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class SimpleRegex
5050

5151
// Create a new regular expression
5252
//
53-
static SimpleRegex *create(char *&s);
53+
static SimpleRegex *create(char * & s);
5454

5555
// Check whether a string matches this regular expression
5656
//
@@ -147,7 +147,7 @@ class SimpleRegex
147147

148148
// Length and pointer to the original string that the regex was parsed from
149149
size_t _regexStrLen;
150-
char *_regexStr;
150+
const char *_regexStr;
151151
};
152152

153153
}

0 commit comments

Comments
 (0)