Fix for compiler warnings
This commit is contained in:
parent
959b9aeec8
commit
be87556ab0
@ -28,6 +28,7 @@
|
||||
* @endverbatim
|
||||
*/
|
||||
#include <buffer.h>
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
* Check if a GWBUF structure is a MySQL COM_QUERY packet
|
||||
@ -75,6 +76,7 @@ char *ptr;
|
||||
ptr += 2; // Skip sequence id and COM_QUERY byte
|
||||
*length = *length - 1;
|
||||
*sql = ptr;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +88,7 @@ int length, newlength;
|
||||
GWBUF *addition;
|
||||
|
||||
if (!modutil_is_SQL(orig))
|
||||
return 0;
|
||||
return NULL;
|
||||
ptr = GWBUF_DATA(orig);
|
||||
length = *ptr++;
|
||||
length += (*ptr++ << 8);
|
||||
|
@ -259,7 +259,7 @@ struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
localtime_r(&tv.tv_sec, &t);
|
||||
sprintf(t_buf, "%02d:%02d:%02d.%-3d %d/%02d/%d, ",
|
||||
t.tm_hour, t.tm_min, t.tm_sec, tv.tv_usec / 1000,
|
||||
t.tm_hour, t.tm_min, t.tm_sec, (int)(tv.tv_usec / 1000),
|
||||
t.tm_mday, t.tm_mon + 1, 1900 + t.tm_year);
|
||||
write(my_session->fd, t_buf, strlen(t_buf));
|
||||
write(my_session->fd, ptr, length);
|
||||
@ -285,7 +285,6 @@ struct timeval tv;
|
||||
static void
|
||||
diagnostic(FILTER *instance, void *fsession, DCB *dcb)
|
||||
{
|
||||
QLA_INSTANCE *my_instance = (QLA_INSTANCE *)instance;
|
||||
QLA_SESSION *my_session = (QLA_SESSION *)fsession;
|
||||
|
||||
if (my_session)
|
||||
|
@ -164,7 +164,6 @@ int i;
|
||||
static void *
|
||||
newSession(FILTER *instance, SESSION *session)
|
||||
{
|
||||
REGEX_INSTANCE *my_instance = (REGEX_INSTANCE *)instance;
|
||||
REGEX_SESSION *my_session;
|
||||
|
||||
if ((my_session = calloc(1, sizeof(REGEX_SESSION))) != NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user