Skip to content

Commit

Permalink
ci: fix and test with Wunused-macros
Browse files Browse the repository at this point in the history
Ticket: 6937
  • Loading branch information
catenacyber authored and victorjulien committed May 24, 2024
1 parent b3eb1c4 commit ce9bfba
Show file tree
Hide file tree
Showing 46 changed files with 75 additions and 151 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-centos-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
git -c advice.detachedHead=false checkout FETCH_HEAD
- run: ./autogen.sh
- run: ./configure
- run: ./configure --enable-warnings
- run: make -j ${{ env.CPUS }}
- run: python3 ./suricata-verify/run.py -q --debug-failed
- run: make install-full
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ jobs:
- name: Configuring
run: |
./autogen.sh
CFLAGS="${DEFAULT_CFLAGS}" ./configure
CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-warnings
- run: make -j ${{ env.CPUS }} distcheck
env:
DISTCHECK_CONFIGURE_FLAGS: "--enable-unittests --enable-debug --enable-lua --enable-geoip --enable-profiling --enable-profiling-locks --enable-dpdk"
Expand Down Expand Up @@ -778,7 +778,7 @@ jobs:
- run: tar xf prep/libhtp.tar.gz
- run: tar xf prep/suricata-update.tar.gz
- run: ./autogen.sh
- run: ./configure --disable-shared
- run: ./configure --enable-warnings --disable-shared
env:
CC: "clang"
RUSTFLAGS: "-C instrument-coverage"
Expand Down Expand Up @@ -877,7 +877,7 @@ jobs:
- run: CC="clang" CFLAGS="$DEFAULT_CFLAGS -Wshadow" ./configure --disable-shared
- run: make check
- run: make distclean
- run: CC="clang" CFLAGS="$DEFAULT_CFLAGS -Wshadow -fsanitize=address -fno-omit-frame-pointer" ./configure --enable-debug --enable-unittests --disable-shared --enable-rust-strict --enable-hiredis --enable-nfqueue --enable-lua
- run: CC="clang" CFLAGS="$DEFAULT_CFLAGS -Wshadow -fsanitize=address -fno-omit-frame-pointer" ./configure --enable-warnings --enable-debug --enable-unittests --disable-shared --enable-rust-strict --enable-hiredis --enable-nfqueue --enable-lua
env:
LDFLAGS: "-fsanitize=address"
ac_cv_func_realloc_0_nonnull: "yes"
Expand Down Expand Up @@ -968,7 +968,7 @@ jobs:
- run: tar xf prep/libhtp.tar.gz
- run: tar xf prep/suricata-update.tar.gz
- run: ./autogen.sh
- run: ./configure --enable-debug --enable-unittests --disable-shared --enable-rust-strict --enable-hiredis --enable-nfqueue
- run: ./configure --enable-warnings --enable-debug --enable-unittests --disable-shared --enable-rust-strict --enable-hiredis --enable-nfqueue
env:
CFLAGS: "${{ env.DEFAULT_CFLAGS }} -Wshadow -fsanitize=address -fno-omit-frame-pointer"
LDFLAGS: "-fsanitize=address"
Expand Down Expand Up @@ -1252,7 +1252,7 @@ jobs:
- run: sudo -u suricata -s ./autogen.sh
working-directory: /home/suricata/suricata

- run: sudo -u suricata -s env PATH="/home/suricata/.cargo/bin:$PATH" ./configure --enable-debug --enable-unittests --disable-shared --enable-rust-strict --enable-hiredis --enable-nfqueue
- run: sudo -u suricata -s env PATH="/home/suricata/.cargo/bin:$PATH" ./configure --enable-warnings --enable-debug --enable-unittests --disable-shared --enable-rust-strict --enable-hiredis --enable-nfqueue
working-directory: /home/suricata/suricata
env:
ac_cv_func_realloc_0_nonnull: "yes"
Expand Down Expand Up @@ -1497,7 +1497,7 @@ jobs:
chmod 755 $HOME/.cargo/bin/cbindgen
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: ./autogen.sh
- run: ./configure --disable-shared --enable-unittests
- run: ./configure --enable-warnings --disable-shared --enable-unittests
env:
CC: "clang-14"
CXX: "clang++-14"
Expand Down Expand Up @@ -2086,7 +2086,7 @@ jobs:
# using leading to random crashes: https://github.com/actions/runner-images/issues/9491
run: sudo sysctl vm.mmap_rnd_bits=28
- run: ./autogen.sh
- run: ./configure --with-gnu-ld --enable-fuzztargets --disable-shared --enable-gccprotect
- run: ./configure --enable-warnings --with-gnu-ld --enable-fuzztargets --disable-shared --enable-gccprotect
env:
LIB_FUZZING_ENGINE: "fail_to_onefile_driver"
CC: "clang-14"
Expand Down Expand Up @@ -2182,7 +2182,7 @@ jobs:
chmod 755 $HOME/.cargo/bin/cbindgen
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: ./autogen.sh
- run: CFLAGS="$DEFAULT_CFLAGS -DNDEBUG" ./configure --enable-unittests
- run: CFLAGS="$DEFAULT_CFLAGS -DNDEBUG" ./configure --enable-warnings --enable-unittests
- run: make -j ${{ env.CPUS }}
- run: make check
- run: make dist
Expand Down Expand Up @@ -2345,7 +2345,7 @@ jobs:
# using leading to random crashes: https://github.com/actions/runner-images/issues/9491
run: sudo sysctl vm.mmap_rnd_bits=28
- run: ./autogen.sh
- run: ./configure --enable-debug-validation
- run: ./configure --enable-warnings --enable-debug-validation
env:
CFLAGS: "${{ env.DEFAULT_CFLAGS }} -Wshadow -fsanitize=address -fno-omit-frame-pointer"
LDFLAGS: "-fsanitize=address"
Expand Down Expand Up @@ -2427,7 +2427,7 @@ jobs:
chmod 755 $HOME/.cargo/bin/cbindgen
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: ./autogen.sh
- run: AFL_HARDEN=1 ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes CFLAGS="-fsanitize=address -fno-omit-frame-pointer" CXXFLAGS=$CFLAGS CC=afl-clang-fast CXX=afl-clang-fast++ LDFLAGS="-fsanitize=address" ./configure --enable-fuzztargets --disable-shared
- run: AFL_HARDEN=1 ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes CFLAGS="-fsanitize=address -fno-omit-frame-pointer" CXXFLAGS=$CFLAGS CC=afl-clang-fast CXX=afl-clang-fast++ LDFLAGS="-fsanitize=address" ./configure --enable-warnings --enable-fuzztargets --disable-shared
- run: AFL_HARDEN=1 make -j ${{ env.CPUS }}

ubuntu-22-04-netmap-build:
Expand Down Expand Up @@ -2521,7 +2521,7 @@ jobs:
chmod 755 $HOME/.cargo/bin/cbindgen
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-netmap
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-warnings --enable-netmap
- run: make -j ${{ env.CPUS }}
- run: ./src/suricata --build-info | grep -E "Netmap support:\s+yes"

Expand Down Expand Up @@ -2626,7 +2626,7 @@ jobs:
chmod 755 $HOME/.cargo/bin/cbindgen
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-dpdk
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-warnings --enable-dpdk
- run: make -j ${{ env.CPUS }}
- run: make check
# IDS config
Expand Down Expand Up @@ -2708,7 +2708,7 @@ jobs:
- run: tar xf prep/suricata-update.tar.gz
- run: tar xf prep/suricata-verify.tar.gz
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-warnings --enable-unittests
- run: make -j ${{ env.CPUS }}
- run: make check
# -j2 caused random failures during cargo vendor
Expand Down Expand Up @@ -2888,7 +2888,7 @@ jobs:
- run: tar xf prep/suricata-update.tar.gz
- run: tar xf prep/suricata-verify.tar.gz
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests --enable-debug --enable-lua --enable-geoip --enable-profiling --enable-profiling-locks --enable-dpdk
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-warnings --enable-unittests --enable-debug --enable-lua --enable-geoip --enable-profiling --enable-profiling-locks --enable-dpdk
- run: make -j ${{ env.CPUS }}
- run: make check
- name: Building Rust documentation
Expand Down Expand Up @@ -2974,7 +2974,7 @@ jobs:
cp prep/cbindgen $HOME/.cargo/bin
chmod 755 $HOME/.cargo/bin/cbindgen
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests --enable-fuzztargets --enable-ebpf --enable-ebpf-build
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-warnings --enable-unittests --enable-fuzztargets --enable-ebpf --enable-ebpf-build
- run: make -j ${{ env.CPUS }}
- run: make check
- run: tar xf prep/suricata-verify.tar.gz
Expand Down Expand Up @@ -3055,7 +3055,7 @@ jobs:
cp prep/cbindgen $HOME/.cargo/bin
chmod 755 $HOME/.cargo/bin/cbindgen
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests --enable-fuzztargets
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-warnings --enable-unittests --enable-fuzztargets
- run: make -j ${{ env.CPUS }}
- run: make check
- run: tar xf prep/suricata-verify.tar.gz
Expand Down Expand Up @@ -3108,7 +3108,7 @@ jobs:
- run: tar xvf prep/libhtp.tar.gz
- run: tar xvf prep/suricata-update.tar.gz
- run: ./autogen.sh
- run: CPATH="$HOMEBREW_PREFIX/include:$CPATH" LIBRARY_PATH="$HOMEBREW_PREFIX/lib:$LIBRARY_PATH" PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests --prefix="$HOME/.local/"
- run: CPATH="$HOMEBREW_PREFIX/include:$CPATH" LIBRARY_PATH="$HOMEBREW_PREFIX/lib:$LIBRARY_PATH" PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-warnings --enable-unittests --prefix="$HOME/.local/"
- run: CPATH="$HOMEBREW_PREFIX/include:$CPATH" LIBRARY_PATH="$HOMEBREW_PREFIX/lib:$LIBRARY_PATH" PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" CFLAGS="${DEFAULT_CFLAGS}" make -j2
# somehow it gets included by some C++ stdlib header (case unsensitive)
- run: rm libhtp/VERSION && make check
Expand Down Expand Up @@ -3164,7 +3164,7 @@ jobs:
- name: Build
run: |
./autogen.sh
CFLAGS="-ggdb -Werror" ./configure --enable-unittests --enable-gccprotect --disable-gccmarch-native --disable-shared --with-libpcap-includes=/npcap/Include --with-libpcap-libraries=/npcap/Lib/x64
CFLAGS="-ggdb -Werror" ./configure --enable-warnings --enable-unittests --enable-gccprotect --disable-gccmarch-native --disable-shared --with-libpcap-includes=/npcap/Include --with-libpcap-libraries=/npcap/Lib/x64
make -j3
- name: Run
run: |
Expand Down Expand Up @@ -3209,7 +3209,7 @@ jobs:
- name: Build
run: |
./autogen.sh
CFLAGS="-ggdb -Werror" ./configure --enable-unittests --enable-gccprotect --disable-gccmarch-native --disable-shared --with-libpcap-includes=/npcap/Include --with-libpcap-libraries=/npcap/Lib/x64
CFLAGS="-ggdb -Werror" ./configure --enable-warnings --enable-unittests --enable-gccprotect --disable-gccmarch-native --disable-shared --with-libpcap-includes=/npcap/Include --with-libpcap-libraries=/npcap/Lib/x64
make -j3
- name: Run
run: |
Expand Down Expand Up @@ -3258,7 +3258,7 @@ jobs:
- name: Build
run: |
./autogen.sh
CFLAGS="-ggdb -Werror" ./configure --enable-gccprotect --disable-gccmarch-native --disable-shared --enable-windivert --with-windivert-include=/windivert/WinDivert-1.4.3-A/include --with-windivert-libraries=/windivert/WinDivert-1.4.3-A/x86_64
CFLAGS="-ggdb -Werror" ./configure --enable-warnings --enable-gccprotect --disable-gccmarch-native --disable-shared --enable-windivert --with-windivert-include=/windivert/WinDivert-1.4.3-A/include --with-windivert-libraries=/windivert/WinDivert-1.4.3-A/x86_64
make -j3
- name: Run
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
export PATH=/opt/work/.cargo/bin:$PATH
chmod +x autogen.sh
./autogen.sh
./configure
./configure --enable-warnings
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
git checkout $rev
echo "Building rev ${rev}" | tee -a build_log.txt
./autogen.sh >> build_log.txt 2>&1
CC="sccache gcc" ./configure --enable-unittests >> build_log.txt 2>&1
CC="sccache gcc" ./configure --enable-warnings --enable-unittests >> build_log.txt 2>&1
if ! make -j2 >> build_log.txt 2>&1; then
echo "::error ::Failed to build rev ${rev}"
tail -n 50 build_log.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
shell: bash {0}
- run: git clone https://github.com/OISF/libhtp -b 0.5.x
- run: ./autogen.sh
- run: ./configure --enable-unittests
- run: ./configure --enable-warnings --enable-unittests
- name: Check formatting
run: |
./scripts/clang-format.sh check-branch --diffstat --show-commits >> check_formatting_log.txt 2>&1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
run: |
./scripts/bundle.sh libhtp
./autogen.sh
./configure
./configure --enable-warnings
- name: Run Cargo Audit
working-directory: rust
run: |
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
run: |
./scripts/bundle.sh libhtp
./autogen.sh
./configure
./configure --enable-warnings
- name: Cargo Update and Build
working-directory: rust
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- run: git config --global --add safe.directory /__w/suricata/suricata
- run: ./scripts/bundle.sh
- run: ./autogen.sh
- run: ./configure
- run: ./configure --enable-warnings
- run: cargo clippy --all-features --fix --allow-no-vcs
working-directory: rust
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- run: git config --global --add safe.directory /__w/suricata/suricata
- run: ./scripts/bundle.sh
- run: ./autogen.sh
- run: scan-build-16 ./configure --enable-dpdk --enable-nfqueue --enable-nflog
- run: scan-build-16 ./configure --enable-warnings --enable-dpdk --enable-nfqueue --enable-nflog
env:
CC: clang-16
# exclude libhtp from the analysis
Expand Down
14 changes: 14 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2460,6 +2460,20 @@ fi
])
AC_SUBST(RUST_FEATURES)

AC_ARG_ENABLE(enable_warnings,
AS_HELP_STRING([--enable-warnings], [Enable supported C compiler warnings]),[enable_warnings=$enableval],[enable_warnings=no])
AS_IF([test "x$enable_warnings" = "xyes"], [
# check if our compiler supports -Wunused-macros
AC_MSG_CHECKING(for -Wunused-macros support)
OCFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Wunused-macros"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
[[]])],
AC_MSG_RESULT([yes]),
[AC_MSG_RESULT([no])
CFLAGS="$OCFLAGS"])
])

AC_CHECK_LIB(fuzzpcap, FPC_IsFuzzPacketCapture, HAS_FUZZPCAP="yes")
AM_CONDITIONAL([HAS_FUZZPCAP], [test "x$HAS_FUZZPCAP" = "xyes"])
AC_ARG_ENABLE(fuzztargets,
Expand Down
16 changes: 4 additions & 12 deletions src/app-layer-dnp3.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#define DNP3_MAX_TRAN_SEQNO 64

/* Maximum application layer sequence number. */
#define DNP3_MAX_APP_SEQNO 16
// unused #define DNP3_MAX_APP_SEQNO 16

/* The number of bytes in the header that are counted as part of the
* header length field. */
Expand All @@ -76,16 +76,11 @@ enum {
};

/* Reserved addresses. */
#define DNP3_RESERVED_ADDR_MIN 0xfff0
#define DNP3_RESERVED_ADDR_MAX 0xfffb
// unused #define DNP3_RESERVED_ADDR_MIN 0xfff0
// unused #define DNP3_RESERVED_ADDR_MAX 0xfffb

/* Source addresses must be < 0xfff0. */
#define DNP3_SRC_ADDR_MAX 0xfff0

#define DNP3_OBJ_TIME_SIZE 6 /* AKA UINT48. */
#define DNP3_OBJ_G12_V1_SIZE 11
#define DNP3_OBJ_G12_V2_SIZE 11
#define DNP3_OBJ_G12_V3_SIZE 1
// unused #define DNP3_SRC_ADDR_MAX 0xfff0

/* Extract the prefix code from the object qualifier. */
#define DNP3_OBJ_PREFIX(x) ((x >> 4) & 0x7)
Expand All @@ -107,9 +102,6 @@ SCEnumCharMap dnp3_decoder_event_table[] = {
/* Calculate the next transport sequence number. */
#define NEXT_TH_SEQNO(current) ((current + 1) % DNP3_MAX_TRAN_SEQNO)

/* Calculate the next application sequence number. */
#define NEXT_APP_SEQNO(current) ((current + 1) % DNP3_MAX_APP_SEQNO)

/* CRC table generated by pycrc - http://github.com/tpircher/pycrc.
* - Polynomial: 0x3d65. */
static const uint16_t crc_table[256] = {
Expand Down
1 change: 0 additions & 1 deletion src/app-layer-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,6 @@ static void ValidateParserProtoDump(AppProto alproto, uint8_t ipproto)

#define BOTH_SET(a, b) ((a) != NULL && (b) != NULL)
#define BOTH_SET_OR_BOTH_UNSET(a, b) (((a) == NULL && (b) == NULL) || ((a) != NULL && (b) != NULL))
#define THREE_SET_OR_THREE_UNSET(a, b, c) (((a) == NULL && (b) == NULL && (c) == NULL) || ((a) != NULL && (b) != NULL && (c) != NULL))
#define THREE_SET(a, b, c) ((a) != NULL && (b) != NULL && (c) != NULL)

static void ValidateParserProto(AppProto alproto, uint8_t ipproto)
Expand Down
18 changes: 3 additions & 15 deletions src/app-layer-smtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,16 @@
#define FILEDATA_CONTENT_INSPECT_WINDOW 4096

/* raw extraction default value */
#define SMTP_RAW_EXTRACTION_DEFAULT_VALUE false
#define SMTP_MAX_REQUEST_AND_REPLY_LINE_LENGTH 510
#define SMTP_RAW_EXTRACTION_DEFAULT_VALUE false

#define SMTP_COMMAND_BUFFER_STEPS 5

/* we are in process of parsing a fresh command. Just a placeholder. If we
* are not in STATE_COMMAND_DATA_MODE, we have to be in this mode */
#define SMTP_PARSER_STATE_COMMAND_MODE 0x00
// unused #define SMTP_PARSER_STATE_COMMAND_MODE 0x00
/* we are in mode of parsing a command's data. Used when we are parsing tls
* or accepting the rfc 2822 mail after DATA command */
#define SMTP_PARSER_STATE_COMMAND_DATA_MODE 0x01
/* Used when we are still in the process of parsing a server command. Used
* with multi-line replies and the stream is fragmented before all the lines
* for a response is seen */
#define SMTP_PARSER_STATE_PARSING_SERVER_RESPONSE 0x02
#define SMTP_PARSER_STATE_COMMAND_DATA_MODE 0x01
/* Used to indicate that the parser has seen the first reply */
#define SMTP_PARSER_STATE_FIRST_REPLY_SEEN 0x04
/* Used to indicate that the parser is parsing a multiline reply */
Expand All @@ -105,13 +100,6 @@
#define SMTP_COMMAND_OTHER_CMD 5
#define SMTP_COMMAND_RSET 6

/* Different EHLO extensions. Not used now. */
#define SMTP_EHLO_EXTENSION_PIPELINING
#define SMTP_EHLO_EXTENSION_SIZE
#define SMTP_EHLO_EXTENSION_DSN
#define SMTP_EHLO_EXTENSION_STARTTLS
#define SMTP_EHLO_EXTENSION_8BITMIME

#define SMTP_DEFAULT_MAX_TX 256

typedef struct SMTPInput_ {
Expand Down
3 changes: 1 addition & 2 deletions src/app-layer-ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ SslConfig ssl_config;
#define SSLV2_MT_REQUEST_CERTIFICATE 7
#define SSLV2_MT_CLIENT_CERTIFICATE 8

#define SSLV3_RECORD_HDR_LEN 5
#define SSLV3_MESSAGE_HDR_LEN 4
#define SSLV3_RECORD_HDR_LEN 5
/** max length according to RFC 5246 6.2.2 is 2^14 + 1024 */
#define SSLV3_RECORD_MAX_LEN ((1 << 14) + 1024)

Expand Down
5 changes: 3 additions & 2 deletions src/detect-bytemath.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@

static int DetectByteMathSetup(DetectEngineCtx *, Signature *, const char *);
#ifdef UNITTESTS
#define DETECT_BYTEMATH_ENDIAN_DEFAULT (uint8_t) BigEndian
#define DETECT_BYTEMATH_BASE_DEFAULT (uint8_t) BaseDec

static void DetectByteMathRegisterTests(void);
#endif
static void DetectByteMathFree(DetectEngineCtx *, void *);

#define DETECT_BYTEMATH_ENDIAN_DEFAULT (uint8_t) BigEndian
#define DETECT_BYTEMATH_BASE_DEFAULT (uint8_t) BaseDec
/**
* \brief Registers the keyword handlers for the "byte_math" keyword.
*/
Expand Down
1 change: 0 additions & 1 deletion src/detect-dce-stub-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
#include "rust.h"

#define BUFFER_NAME "dce_stub_data"
#define KEYWORD_NAME "dce_stub_data"

static int DetectDceStubDataSetup(DetectEngineCtx *, Signature *, const char *);
#ifdef UNITTESTS
Expand Down
Loading

0 comments on commit ce9bfba

Please sign in to comment.