Expand compiler flags for static code analysis
This commit is contained in:
parent
a6c2d808eb
commit
707c75131c
14
.vscode/tasks.json
vendored
14
.vscode/tasks.json
vendored
@ -8,9 +8,12 @@
|
||||
"type":"shell",
|
||||
"command": "make all -j4",
|
||||
"problemMatcher": {
|
||||
"base": "gcc",
|
||||
"base": "$gcc",
|
||||
"owner": "gcc",
|
||||
"fileLocation":"absolute"
|
||||
"fileLocation": [
|
||||
"relative",
|
||||
"${workspaceFolder}"
|
||||
]
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
@ -22,9 +25,12 @@
|
||||
"type":"shell",
|
||||
"command": "make clean -j4",
|
||||
"problemMatcher": {
|
||||
"base": "gcc",
|
||||
"base": "$gcc",
|
||||
"owner": "gcc",
|
||||
"fileLocation":"absolute"
|
||||
"fileLocation": [
|
||||
"relative",
|
||||
"${workspaceFolder}"
|
||||
]
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
|
2
Makefile
2
Makefile
@ -20,7 +20,7 @@ LIBS := ftdi
|
||||
endif
|
||||
|
||||
LD_FLAGS :=
|
||||
C_FLAGS := -O0 -g
|
||||
C_FLAGS := -O0 -g -Wall -Wextra -Werror
|
||||
CPP_FLAGS := $(addprefix -I, $(INCLUDES))
|
||||
|
||||
C_SRCS = $(wildcard $(SRC_DIR)/*.c)
|
||||
|
@ -108,7 +108,7 @@ int gpio_read(const struct gpio *gpio, unsigned int *value)
|
||||
int gpio_write(const struct gpio *gpio, unsigned int value)
|
||||
{
|
||||
int res;
|
||||
unsigned char mask;
|
||||
unsigned char mask = gpio->ftdi_dev->status_mask;
|
||||
|
||||
if(NULL == gpio) {
|
||||
return EXIT_FAILURE;
|
||||
|
@ -31,7 +31,7 @@ static const struct gpio gpio_2 = {
|
||||
.ftdi_dev = &ftdi_obj,
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(void)
|
||||
{
|
||||
int res, cnt;
|
||||
unsigned int value;
|
||||
|
Loading…
Reference in New Issue
Block a user