Addition of -Wall to CFLAGS
Cleanup warnings produced by above with the exception of those files requiring reorganisation
This commit is contained in:
@ -21,7 +21,7 @@
|
|||||||
# 17/06/13 Mark Riddoch Addition of dependency generation
|
# 17/06/13 Mark Riddoch Addition of dependency generation
|
||||||
|
|
||||||
CC=cc
|
CC=cc
|
||||||
CFLAGS=-c -I/usr/include -I../include
|
CFLAGS=-c -I/usr/include -I../include -Wall
|
||||||
LDFLAGS=-rdynamic
|
LDFLAGS=-rdynamic
|
||||||
SRCS= atomic.c buffer.c spinlock.c gateway.c gateway_mysql_protocol.c gw_utils.c \
|
SRCS= atomic.c buffer.c spinlock.c gateway.c gateway_mysql_protocol.c gw_utils.c \
|
||||||
utils.c dcb.c load_utils.c
|
utils.c dcb.c load_utils.c
|
||||||
|
@ -164,7 +164,7 @@ int epollfd = -1; // Need to work out how to get this
|
|||||||
void
|
void
|
||||||
printDCB(DCB *dcb)
|
printDCB(DCB *dcb)
|
||||||
{
|
{
|
||||||
(void)printf("DCB: 0x%x\n", (void *)dcb);
|
(void)printf("DCB: 0x%p\n", (void *)dcb);
|
||||||
(void)printf("\tDCB state: %s\n", gw_dcb_state2string(dcb->state));
|
(void)printf("\tDCB state: %s\n", gw_dcb_state2string(dcb->state));
|
||||||
(void)printf("\tQueued write data: %d\n", gwbuf_length(dcb->writeq));
|
(void)printf("\tQueued write data: %d\n", gwbuf_length(dcb->writeq));
|
||||||
(void)printf("\tStatistics:\n");
|
(void)printf("\tStatistics:\n");
|
||||||
|
@ -163,8 +163,6 @@ void *handle;
|
|||||||
static MODULES *
|
static MODULES *
|
||||||
find_module(const char *module)
|
find_module(const char *module)
|
||||||
{
|
{
|
||||||
MODULES *ptr = registered;
|
|
||||||
|
|
||||||
while (registered)
|
while (registered)
|
||||||
if (strcmp(registered->module, module))
|
if (strcmp(registered->module, module))
|
||||||
return registered;
|
return registered;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
# 13/06/13 Mark Riddoch Initial protocol module development
|
# 13/06/13 Mark Riddoch Initial protocol module development
|
||||||
|
|
||||||
CC=cc
|
CC=cc
|
||||||
CFLAGS=-c -fPIC -I/usr/include -I../include -I../../include
|
CFLAGS=-c -fPIC -I/usr/include -I../include -I../../include -Wall
|
||||||
LDFLAGS=-shared
|
LDFLAGS=-shared
|
||||||
MYSQLCLIENTSRCS=mysql_client.c
|
MYSQLCLIENTSRCS=mysql_client.c
|
||||||
MYSQLCLIENTOBJ=$(MYSQLCLIENTSRCS:.c=.o)
|
MYSQLCLIENTOBJ=$(MYSQLCLIENTSRCS:.c=.o)
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
# 13/06/13 Mark Riddoch Initial routing module development
|
# 13/06/13 Mark Riddoch Initial routing module development
|
||||||
|
|
||||||
CC=cc
|
CC=cc
|
||||||
CFLAGS=-c -fPIC -I/usr/include -I../include -I../../include
|
CFLAGS=-c -fPIC -I/usr/include -I../include -I../../include -Wall
|
||||||
LDFLAGS=-shared
|
LDFLAGS=-shared
|
||||||
TESTSRCS=testroute.c
|
TESTSRCS=testroute.c
|
||||||
TESTOBJ=$(TESTSRCS:.c=.o)
|
TESTOBJ=$(TESTSRCS:.c=.o)
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#include <spinlock.h>
|
#include <spinlock.h>
|
||||||
#include <readconnection.h>
|
#include <readconnection.h>
|
||||||
#include <dcb.h>
|
#include <dcb.h>
|
||||||
|
#include <spinlock.h>
|
||||||
|
|
||||||
static char *version_str = "V1.0.0";
|
static char *version_str = "V1.0.0";
|
||||||
|
|
||||||
@ -144,7 +145,7 @@ int i, n;
|
|||||||
free(inst->servers[i]);
|
free(inst->servers[i]);
|
||||||
free(inst->servers);
|
free(inst->servers);
|
||||||
free(inst);
|
free(inst);
|
||||||
return;
|
return NULL;
|
||||||
}
|
}
|
||||||
inst->servers[n]->hostname = strdup(server->name);
|
inst->servers[n]->hostname = strdup(server->name);
|
||||||
inst->servers[n]->protocol = strdup(server->protocol);
|
inst->servers[n]->protocol = strdup(server->protocol);
|
||||||
@ -158,7 +159,7 @@ int i, n;
|
|||||||
* insert this router instance into the linked list of routers
|
* insert this router instance into the linked list of routers
|
||||||
* that have been created with this module.
|
* that have been created with this module.
|
||||||
*/
|
*/
|
||||||
spinlock_aquire(&instlock);
|
spinlock_acquire(&instlock);
|
||||||
inst->next = instances;
|
inst->next = instances;
|
||||||
instances = inst;
|
instances = inst;
|
||||||
spinlock_release(&instlock);
|
spinlock_release(&instlock);
|
||||||
|
@ -74,6 +74,7 @@ GetModuleObject()
|
|||||||
static ROUTER *
|
static ROUTER *
|
||||||
createInstance(SERVICE *service)
|
createInstance(SERVICE *service)
|
||||||
{
|
{
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,6 +87,7 @@ createInstance(SERVICE *service)
|
|||||||
static void *
|
static void *
|
||||||
newSession(ROUTER *instance, SESSION *session)
|
newSession(ROUTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,4 +106,5 @@ closeSession(ROUTER *instance, void *session)
|
|||||||
static int
|
static int
|
||||||
routeQuery(ROUTER *instance, void *session, GWBUF *queue)
|
routeQuery(ROUTER *instance, void *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user