From 43b2e63c1ed7b9bf19a4d2c85c8a38f30b572e53 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 15 Jun 2011 14:11:39 +0200 Subject: [PATCH] Fix minor compiler comments in CUDA code. --- src/runmode-pcap-file.c | 1 + src/runmode-pcap.c | 1 + src/util-mpm-b2g-cuda.c | 3 ++- src/util-mpm.c | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/runmode-pcap-file.c b/src/runmode-pcap-file.c index 0913206727..9407441400 100644 --- a/src/runmode-pcap-file.c +++ b/src/runmode-pcap-file.c @@ -24,6 +24,7 @@ #include "output.h" #include "cuda-packet-batcher.h" #include "source-pfring.h" +#include "detect-engine-mpm.h" #include "alert-fastlog.h" #include "alert-prelude.h" diff --git a/src/runmode-pcap.c b/src/runmode-pcap.c index ac5df8e49d..a45dd9cc86 100644 --- a/src/runmode-pcap.c +++ b/src/runmode-pcap.c @@ -24,6 +24,7 @@ #include "output.h" #include "cuda-packet-batcher.h" #include "source-pfring.h" +#include "detect-engine-mpm.h" #include "alert-fastlog.h" #include "alert-prelude.h" diff --git a/src/util-mpm-b2g-cuda.c b/src/util-mpm-b2g-cuda.c index 7e0c72e4d9..836fc3c339 100644 --- a/src/util-mpm-b2g-cuda.c +++ b/src/util-mpm-b2g-cuda.c @@ -2369,6 +2369,7 @@ void B2gCudaKillDispatcherThreadRC(void) static int B2gCudaTest01(void) { + Packet *p = NULL; MpmCtx mpm_ctx; MpmThreadCtx mpm_thread_ctx; B2gCudaCtx *ctx = NULL; @@ -2427,7 +2428,7 @@ static int B2gCudaTest01(void) pb->packets_offset_buffer[0] = 0; pb->packets_payload_offset_buffer[0] = 0; - Packet *p = SCMalloc(SIZE_OF_PACKET); + p = SCMalloc(SIZE_OF_PACKET); if (p == NULL) goto end; memset(p, 0, SIZE_OF_PACKET); diff --git a/src/util-mpm.c b/src/util-mpm.c index eaff858ade..2b5f01903f 100644 --- a/src/util-mpm.c +++ b/src/util-mpm.c @@ -654,6 +654,7 @@ void MpmCudaConfCleanup(MpmCudaConf *conf) /************************************Unittests*********************************/ +#ifdef UNITTESTS #ifdef __SC_CUDA_SUPPORT__ static int MpmInitYamlConf(char *conf) @@ -1217,6 +1218,7 @@ static int MpmTest11(void) } #endif /* __SC_CUDA_SUPPORT__ */ +#endif /* UNITTESTS */ void MpmRegisterTests(void) { #ifdef UNITTESTS