mirror of https://github.com/rui314/chibicc
Turn on -Wall compiler flag and fix compiler warnings
This commit is contained in:
parent
b1fdddff15
commit
2c91da54df
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
|||
CFLAGS=-std=c11 -g -fno-common
|
||||
CFLAGS=-std=c11 -g -fno-common -Wall -Wno-switch
|
||||
|
||||
SRCS=$(wildcard *.c)
|
||||
OBJS=$(SRCS:.c=.o)
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdnoreturn.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -79,9 +80,9 @@ struct Token {
|
|||
Token *origin; // If this is expanded from a macro, the original token
|
||||
};
|
||||
|
||||
void error(char *fmt, ...);
|
||||
void error_at(char *loc, char *fmt, ...);
|
||||
void error_tok(Token *tok, char *fmt, ...);
|
||||
noreturn void error(char *fmt, ...);
|
||||
noreturn void error_at(char *loc, char *fmt, ...);
|
||||
noreturn void error_tok(Token *tok, char *fmt, ...);
|
||||
void warn_tok(Token *tok, char *fmt, ...);
|
||||
bool equal(Token *tok, char *op);
|
||||
Token *skip(Token *tok, char *op);
|
||||
|
|
Loading…
Reference in New Issue