Skip to content

Commit

Permalink
modern C requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
pascaldekloe committed Jul 23, 2023
1 parent 5807a07 commit baf01a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions c/bench/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ scheme_generated.h: ../../testdata/bench/scheme.fbs
$(FLATC) --cpp -o . ../../testdata/bench/scheme.fbs

Colfer.o: Colfer.h Colfer.c
$(CC) $(CFLAGS) -o $@ -c -std=c11 Colfer.c
$(CC) $(CFLAGS) -o $@ -c -std=c14 Colfer.c

scheme.pb.o: scheme.pb.cc
$(CXX) $(CXXFLAGS) -o $@ -c -std=c++11 scheme.pb.cc
$(CXX) $(CXXFLAGS) -o $@ -c -std=c++14 scheme.pb.cc

bench: bench.cpp Colfer.o scheme.pb.o scheme_generated.h
$(CXX) $(CXXFLAGS) -o $@ -lstdc++ -lprotobuf -lbenchmark -std=c++11 bench.cpp Colfer.o scheme.pb.o
$(CXX) $(CXXFLAGS) -o $@ -lstdc++ -lprotobuf -lbenchmark -std=c++14 bench.cpp Colfer.o scheme.pb.o

.PHONY: clean
clean:
Expand Down
2 changes: 1 addition & 1 deletion c/gen_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void gen_o_dump(const gen_o o) {
free(buf);
}

int main() {
int main(void) {
const int n = sizeof(golden_cases) / sizeof(golden);
printf("got %d golden cases\n", n);

Expand Down

0 comments on commit baf01a1

Please sign in to comment.