Remove explicit long indicator of size defines

This commit is contained in:
Johan Wikman 2017-01-19 10:42:05 +02:00
parent 7ed7f972b1
commit 8aa76727d2
4 changed files with 8 additions and 8 deletions

View File

@ -70,10 +70,10 @@ MXS_BEGIN_DECLS
#define GW_MYSQL_READ 0
#define GW_MYSQL_WRITE 1
#define MYSQL_HEADER_LEN 4L
#define MYSQL_CHECKSUM_LEN 4L
#define MYSQL_EOF_PACKET_LEN 9L
#define MYSQL_OK_PACKET_MIN_LEN 11L
#define MYSQL_HEADER_LEN 4
#define MYSQL_CHECKSUM_LEN 4
#define MYSQL_EOF_PACKET_LEN 9
#define MYSQL_OK_PACKET_MIN_LEN 11
/**
* Offsets and sizes of various parts of the client packet. If the offset is

View File

@ -553,7 +553,7 @@ static bool parse_query(GWBUF* query)
}
else
{
MXS_ERROR("Packet size %ld, provided buffer is %ld.",
MXS_ERROR("Packet size %u, provided buffer is %ld.",
MYSQL_HEADER_LEN + MYSQL_GET_PAYLOAD_LEN(data),
GWBUF_LENGTH(query));
}

View File

@ -778,7 +778,7 @@ static int handle_rows(MAXROWS_SESSION_DATA *csdata)
*/
if (packetlen < MYSQL_EOF_PACKET_LEN)
{
MXS_ERROR("EOF packet has size of %lu instead of %ld", packetlen, MYSQL_EOF_PACKET_LEN);
MXS_ERROR("EOF packet has size of %lu instead of %d", packetlen, MYSQL_EOF_PACKET_LEN);
rv = send_ok_upstream(csdata);
csdata->state = MAXROWS_EXPECTING_NOTHING;
break;

View File

@ -2310,8 +2310,8 @@ bool blr_send_packet(ROUTER_SLAVE *slave, uint8_t *buf, uint32_t len, bool first
}
else
{
MXS_ERROR("failed to allocate %ld bytes of memory when writing an"
" event.", datalen + MYSQL_HEADER_LEN);
MXS_ERROR("failed to allocate %u bytes of memory when writing an "
"event.", datalen + MYSQL_HEADER_LEN);
rval = false;
}
return rval;