Project

General

Profile

Bug #436 ยป 0001-fix-compiler-warnings.patch

Anoop Saldanha, 03/27/2012 07:06 AM

View differences:

src/tmqh-flow.c
{
int retval = 0;
Tmq *tmq = NULL;
TmqhFlowCtx *fctx = NULL;
TmqResetQueues();
......
if (ctx == NULL)
goto end;
TmqhFlowCtx *fctx = (TmqhFlowCtx *)ctx;
fctx = (TmqhFlowCtx *)ctx;
if (fctx->size != 4)
goto end;
......
{
int retval = 0;
Tmq *tmq = NULL;
TmqhFlowCtx *fctx = NULL;
TmqResetQueues();
......
if (ctx == NULL)
goto end;
TmqhFlowCtx *fctx = (TmqhFlowCtx *)ctx;
fctx = (TmqhFlowCtx *)ctx;
if (fctx->size != 1)
goto end;
......
static int TmqhOutputFlowSetupCtxTest03(void)
{
int retval = 0;
TmqhFlowCtx *fctx = NULL;
TmqResetQueues();
......
if (ctx == NULL)
goto end;
TmqhFlowCtx *fctx = (TmqhFlowCtx *)ctx;
fctx = (TmqhFlowCtx *)ctx;
if (fctx->size != 4)
goto end;
src/util-hash-lookup3.c
u.ptr = key;
if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
const uint8_t *k8;
/*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
while (length > 12)
......
#else /* make valgrind happy */
k8 = (const uint8_t *)k;
const uint8_t *k8 = (const uint8_t *)k;
switch(length)
{
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
......
u.ptr = key;
if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
const uint8_t *k8;
/*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
while (length > 12)
......
#else /* make valgrind happy */
k8 = (const uint8_t *)k;
const uint8_t *k8 = (const uint8_t *)k;
switch(length)
{
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
......
u.ptr = key;
if (HASH_BIG_ENDIAN && ((u.i & 0x3) == 0)) {
const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
const uint8_t *k8;
/*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
while (length > 12)
......
#else /* make valgrind happy */
k8 = (const uint8_t *)k;
const uint8_t *k8 = (const uint8_t *)k;
switch(length) /* all the case statements fall through */
{
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
    (1-1/1)