summaryrefslogtreecommitdiff
path: root/x2p/str.c
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>2007-12-21 14:30:20 +0000
committerSteve Peters <steve@fisharerojo.org>2007-12-21 14:48:22 +0000
commitaab391487e4ce7ac2d97b35a504de2697fadd1b6 (patch)
treef5ccfcad7dcc2a485c904f8f35cdd5e09f31ef78 /x2p/str.c
parent3f5211dd25d06319ac363a33485c17282b4021a7 (diff)
downloadperl-aab391487e4ce7ac2d97b35a504de2697fadd1b6.tar.gz
C<make translators> -Wwrite-strings clean
From: "Robin Barker" <Robin.Barker@npl.co.uk> Message-ID: <46A0F33545E63740BC7563DE59CA9C6D09399C@exchsvr2.npl.ad.local> p4raw-id: //depot/perl@32690
Diffstat (limited to 'x2p/str.c')
-rw-r--r--x2p/str.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/x2p/str.c b/x2p/str.c
index 0b1c940167..3909f5bf2d 100644
--- a/x2p/str.c
+++ b/x2p/str.c
@@ -25,7 +25,7 @@ str_2ptr(register STR *str)
register char *s;
if (!str)
- return "";
+ return (char *)""; /* probably safe - won't be written to */
GROWSTR(&(str->str_ptr), &(str->str_len), 24);
s = str->str_ptr;
if (str->str_nok) {
@@ -56,7 +56,7 @@ str_sset(STR *dstr, register STR *sstr)
}
void
-str_nset(register STR *str, register char *ptr, register int len)
+str_nset(register STR *str, register const char *ptr, register int len)
{
GROWSTR(&(str->str_ptr), &(str->str_len), len + 1);
memcpy(str->str_ptr,ptr,len);
@@ -67,7 +67,7 @@ str_nset(register STR *str, register char *ptr, register int len)
}
void
-str_set(register STR *str, register char *ptr)
+str_set(register STR *str, register const char *ptr)
{
register int len;
@@ -82,7 +82,7 @@ str_set(register STR *str, register char *ptr)
}
void
-str_ncat(register STR *str, register char *ptr, register int len)
+str_ncat(register STR *str, register const char *ptr, register int len)
{
if (!(str->str_pok))
str_2ptr(str);
@@ -104,7 +104,7 @@ str_scat(STR *dstr, register STR *sstr)
}
void
-str_cat(register STR *str, register char *ptr)
+str_cat(register STR *str, register const char *ptr)
{
register int len;
@@ -250,7 +250,7 @@ thats_all_folks:
}
STR *
-str_make(char *s)
+str_make(const char *s)
{
register STR *str = str_new(0);