From 27235c0046dfc87b4f57c652681df4436fce3e0e Mon Sep 17 00:00:00 2001 From: David Wragg Date: Wed, 28 Jul 2010 01:08:49 +0100 Subject: Fix "const char *" to "void *" conversion warnings Functions returning a heap-allocated string should return a "char *", not a "const char *": Because the result is heap-allocated and becomes the responsibility of the caller, it is certainly modifiable. And the pointer will likely get passed to free(), triggering a conversion warning from gcc. So remove all the relevant consts. --- librabbitmq/amqp_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'librabbitmq/amqp_api.c') diff --git a/librabbitmq/amqp_api.c b/librabbitmq/amqp_api.c index 722bc86..2b1ed54 100644 --- a/librabbitmq/amqp_api.c +++ b/librabbitmq/amqp_api.c @@ -69,7 +69,7 @@ static const char *client_error_strings[ERROR_MAX] = { "connection closed unexpectedly", /* ERROR_CONNECTION_CLOSED */ }; -const char *amqp_error_string(int err) +char *amqp_error_string(int err) { const char *str; int category = (err & ERROR_CATEGORY_MASK); -- cgit v1.2.1