summaryrefslogtreecommitdiff
path: root/stream.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2010-09-06 22:08:24 +0000
committerDmitry V. Levin <ldv@altlinux.org>2010-09-07 00:59:18 +0000
commit30145dda9d7ff70df1d5ad750a183572c73e8963 (patch)
treeae931a871df38fddd20dd8111f83112c5f494e6b /stream.c
parentcbdd1900a16016343c172db09fc48a83e7fa22ac (diff)
downloadstrace-30145dda9d7ff70df1d5ad750a183572c73e8963.tar.gz
strace-30145dda9d7ff70df1d5ad750a183572c73e8963.tar.bz2
strace-30145dda9d7ff70df1d5ad750a183572c73e8963.tar.xz
Fix const-correctness issues uncovered by gcc -Wwrite-strings
* defs.h (struct xlat): Add const qualifier to the field of type "char *". (set_sortby, qualify, printnum, printnum_int): Add const qualifier to arguments of type "char *". * count.c (set_sortby): Add const qualifier to the argument and automatic variable of type "char *". * desc.c (decode_select): Add const qualifier to automatic variables of type "char *". * ioctlsort.c (struct ioctlent): Add const qualifier to fields of type "char *". (main): Add const qualifier to argv. * process.c (printargv): Add const qualifier to the argument and automatic variable of type "char *". (printargc) Add const qualifier to argument of type "char *". * signal.c (sprintsigmask, parse_sigset_t): Add const qualifier to arguments of type "char *". * strace.c (progname): Add const qualifier. (detach): Add const qualifier to automatic variable of type "char *". * stream.c (struct strbuf): Add const qualifier to the field of type "char *". * syscall.c (struct qual_options): Add const qualifier to fields of type "char *". (qual_syscall, qual_fault, qual_desc, lookup_class): Add const qualifier to arguments of type "char *". (qual_signal): Add const qualifier to the argument of type "char *", avoid modification of constant argument. (qualify): Likewise. * util.c (printflags): Add const qualifier to automatic variable of type "char *". (printnum, printnum_int): Add const qualifier to arguments of type "char *".
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream.c b/stream.c
index 41fd823..e5868c9 100644
--- a/stream.c
+++ b/stream.c
@@ -57,7 +57,7 @@
struct strbuf {
int maxlen; /* no. of bytes in buffer */
int len; /* no. of bytes returned */
- char *buf; /* pointer to data */
+ const char *buf; /* pointer to data */
};
#define MORECTL 1
#define MOREDATA 2