From: Leandro Lucarella Date: Fri, 21 Sep 2007 16:21:17 +0000 (-0300) Subject: Fix an implicit cast from const char* (string literal) to char*. X-Git-Tag: 1.0~8 X-Git-Url: https://git.llucax.com/software/eventxx.git/commitdiff_plain/82c7b420703e0fe842d38cc571a260a8494d7bc2 Fix an implicit cast from const char* (string literal) to char*. This avoids a compiler warning (and does the right thing(TM)). --- 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);