From 82c7b420703e0fe842d38cc571a260a8494d7bc2 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Fri, 21 Sep 2007 13:21:17 -0300 Subject: [PATCH] Fix an implicit cast from const char* (string literal) to char*. This avoids a compiler warning (and does the right thing(TM)). --- test/test-eof.cpp | 2 +- test/test-weof.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-eof.cpp b/test/test-eof.cpp index 4b30013..c1c05db 100644 --- a/test/test-eof.cpp +++ b/test/test-eof.cpp @@ -50,7 +50,7 @@ read_cb(int fd, short event, void *arg) int main (int argc, char **argv) { - char *test = "test string"; + const char* test = "test string"; int pair[2]; if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) diff --git a/test/test-weof.cpp b/test/test-weof.cpp index ffe0a88..589df4a 100644 --- a/test/test-weof.cpp +++ b/test/test-weof.cpp @@ -33,7 +33,7 @@ eventxx::event< cb_t >* ev; void write_cb(int fd, short event) { - char *test = "test string"; + const char* test = "test string"; int len; len = write(fd, test, strlen(test) + 1); -- 2.43.0