Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ SRC = $(wildcard *.c)
# -Wall to get all the possible warnings
# -ansi -pendantic to get portable code
ifeq ($(DEBUG),yes)
CFLAGS=-W -Wall -ansi -pedantic -g -std=c99
LDFLAGS= -Wall -lm
CFLAGS=-W -Werror=unused-variable -Wall -ansi -pedantic -g -std=c99
LDFLAGS= -Werror=unused-variable -Wall -lm
else
CFLAGS=-W -Wall -ansi -pedantic -std=c99 -O3
LDFLAGS= -Wall -lm
CFLAGS=-W -Werror=unused-variable -Wall -ansi -pedantic -std=c99 -O3
LDFLAGS= -Werror=unused-variable -Wall -lm
endif

###############################################
Expand Down
3 changes: 2 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#include <stdint.h>
#include "dependency.h"

// Demo for CI Pipeline autofix
int main(void)
{
uint8_t foo = 5; /* unused variable */
uint8_t foo __attribute__((unused)) = 5; /* intentionally unused variable */
dependency();
return 0;
}