Skip to content

Commit

Permalink
Fix -Wformat-security warning
Browse files Browse the repository at this point in the history
It was causing the CI to fail, because that's part of -Wextra for them?
Fixes #18
  • Loading branch information
hugomg committed Aug 9, 2024
1 parent a04d767 commit 1ecac92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ INSTALL_EXEC= $(INSTALL) -m 0755
INSTALL_DATA= $(INSTALL) -m 0644

# C compilation flags
CFLAGS = -DPT_DEBUG -O2 -std=c99 -pedantic -Wall -Wextra
CFLAGS = -DPT_DEBUG -O2 -std=c99 -pedantic -Wall -Wextra -Wformat-security
CPPFLAGS = -I$(LUA_INCDIR)
LIBFLAG = -fPIC -shared

Expand Down
2 changes: 1 addition & 1 deletion pt-run.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static void pt_run_dbg_print(const char *buf, bool *ellipsis, int *pframes, int
|| ((nframes - *pframes) <= PT_RUN_TRACEBACK_BOTTOM_THRESHOLD);

if(luai_likely(should_print))
fprintf(stderr, buf);
fprintf(stderr, "%s", buf);
else if(*ellipsis) {
fprintf(stderr, "\n ... (Skipped %d frames) ...\n\n",
nframes - (PT_RUN_TRACEBACK_TOP_THRESHOLD
Expand Down

0 comments on commit 1ecac92

Please sign in to comment.