Skip to content

Commit 1bbafbd

Browse files
IvanNardiclaude
andcommitted
Build system: Apply warning flags consistently to performance tests
Ensure that performance test tools are compiled with project warning flags (NDPI_CFLAGS) for consistent code quality standards across the codebase. Previously, tests/performance/Makefile.in compiled tools (gcrypt-int, gcrypt-gnu, substringsearch, strnstr, geo, patriciasearch) with only user-provided CFLAGS, missing the project's warning flags (-W, -Wall, -Wno-address-of-packed-member). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 9587059 commit 1bbafbd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/performance/Makefile.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ all: $(TESTS)
1717
tools: $(TOOLS)
1818

1919
gcrypt-int: $(srcdir)/gcrypt.c Makefile $(GEN_HEADERS)
20-
$(CC) $(INC) @CFLAGS@ $(srcdir)/gcrypt.c -o $@
20+
$(CC) $(INC) @NDPI_CFLAGS@ @CFLAGS@ $(srcdir)/gcrypt.c -o $@
2121

2222
gcrypt-gnu: $(srcdir)/gcrypt.c Makefile $(GEN_HEADERS)
23-
$(CC) $(INC) @CFLAGS@ -DHAVE_LIBGCRYPT $(srcdir)/gcrypt.c -o $@ -lgcrypt
23+
$(CC) $(INC) @NDPI_CFLAGS@ @CFLAGS@ -DHAVE_LIBGCRYPT $(srcdir)/gcrypt.c -o $@ -lgcrypt
2424

2525
substringsearch: $(srcdir)/substringsearch.c Makefile $(GEN_HEADERS)
26-
$(CC) $(INC) @CFLAGS@ $(srcdir)/substringsearch.c -o substringsearch $(LIB)
26+
$(CC) $(INC) @NDPI_CFLAGS@ @CFLAGS@ $(srcdir)/substringsearch.c -o substringsearch $(LIB)
2727

2828
strnstr: $(srcdir)/strnstr.cpp Makefile $(GEN_HEADERS)
29-
$(CXX) $(INC) @CFLAGS@ $(srcdir)/strnstr.cpp -o strnstr
29+
$(CXX) $(INC) @NDPI_CFLAGS@ @CFLAGS@ $(srcdir)/strnstr.cpp -o strnstr
3030

3131
geo: $(srcdir)/geo.c Makefile $(GEN_HEADERS)
32-
$(CC) $(INC) @CFLAGS@ $(srcdir)/geo.c -o geo $(LIB)
32+
$(CC) $(INC) @NDPI_CFLAGS@ @CFLAGS@ $(srcdir)/geo.c -o geo $(LIB)
3333

3434
substring_test: substringsearch top-1m.csv
3535
./substringsearch
@@ -43,7 +43,7 @@ geo_test: geo
4343
#
4444

4545
patriciasearch: $(srcdir)/patriciasearch.c Makefile $(GEN_HEADERS)
46-
$(CC) $(INC) @CFLAGS@ $(srcdir)/patriciasearch.c -o patriciasearch $(LIB)
46+
$(CC) $(INC) @NDPI_CFLAGS@ @CFLAGS@ $(srcdir)/patriciasearch.c -o patriciasearch $(LIB)
4747

4848
patricia_test: patriciasearch blacklist-ip.txt
4949
./patriciasearch

0 commit comments

Comments
 (0)