Fix build in debugging mode

This commit is contained in:
Pierre Pronchery 2016-09-25 04:22:29 +02:00
parent 7da7cb4d31
commit c42f0ad7cd
4 changed files with 6 additions and 3 deletions

View File

@ -53,7 +53,7 @@ AppMessage * appmessage_new_acknowledgement(AppMessageID id)
AppMessage * message; AppMessage * message;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "DEBUG: %s(\"%s\")\n", __func__, method); fprintf(stderr, "DEBUG: %s(%u)\n", __func__, id);
#endif #endif
if((message = object_new(sizeof(*message))) == NULL) if((message = object_new(sizeof(*message))) == NULL)
return NULL; return NULL;

View File

@ -415,7 +415,7 @@ static int _tcp_send(TCP * tcp, AppMessage * message)
static int _tcp_error(char const * message) static int _tcp_error(char const * message)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "DEBUG: %s(\"%s\", %d)\n", __func__, message, code); fprintf(stderr, "DEBUG: %s(\"%s\")\n", __func__, message);
#endif #endif
return error_set_code(-errno, "%s%s%s", return error_set_code(-errno, "%s%s%s",
(message != NULL) ? message : "", (message != NULL) ? message : "",

View File

@ -300,6 +300,9 @@ static int _udp_client_send(UDP * udp, AppTransportClient * client,
size_t i; size_t i;
UDPClient * c; UDPClient * c;
Buffer * buffer; Buffer * buffer;
#ifdef DEBUG
struct sockaddr_in * sa;
#endif
/* lookup the client */ /* lookup the client */
for(i = 0; i < udp->u.server.clients_cnt; i++) for(i = 0; i < udp->u.server.clients_cnt; i++)

View File

@ -72,7 +72,7 @@ static int _appclient(int verbose, char const * app, char const * name,
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "DEBUG: %s(%d, %s, %s, %p, %zu)\n", __func__, verbose, fprintf(stderr, "DEBUG: %s(%d, %s, %s, %p, %zu)\n", __func__, verbose,
hostname, service, (void *)calls, calls_cnt); app, name, (void *)calls, calls_cnt);
#endif #endif
if((ac = appclient_new(NULL, app, name)) == NULL) if((ac = appclient_new(NULL, app, name)) == NULL)
return _error(PROGNAME, 1); return _error(PROGNAME, 1);