[make] add -Wstrict-prototypes and clean up old C style prototypes
replace all built versions of foo(); with foo(void);
This commit is contained in:
@@ -55,7 +55,7 @@ static int sem_remaining_its = 0;
|
||||
static int sem_threads = 0;
|
||||
static mutex_t sem_test_mutex;
|
||||
|
||||
static int semaphore_producer()
|
||||
static int semaphore_producer(void *unused)
|
||||
{
|
||||
printf("semaphore producer %p starting up, running for %d iterations\n", current_thread, sem_total_its);
|
||||
|
||||
@@ -66,7 +66,7 @@ static int semaphore_producer()
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int semaphore_consumer()
|
||||
static int semaphore_consumer(void *unused)
|
||||
{
|
||||
unsigned int iterations = 0;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ __BEGIN_CDECLS
|
||||
|
||||
void arm_context_switch(vaddr_t *old_sp, vaddr_t new_sp);
|
||||
|
||||
static inline uint32_t read_cpsr()
|
||||
static inline uint32_t read_cpsr(void)
|
||||
{
|
||||
uint32_t cpsr;
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ CONFIGHEADER := $(BUILDDIR)/config.h
|
||||
GLOBAL_INCLUDES := $(BUILDDIR) $(LKROOT)/include $(addsuffix /include,$(LKINC))
|
||||
GLOBAL_OPTFLAGS ?= -Os
|
||||
GLOBAL_COMPILEFLAGS := -g -finline -W -Wall -Wno-multichar -Wno-unused-parameter -Wno-unused-function -include $(CONFIGHEADER)
|
||||
GLOBAL_CFLAGS := --std=gnu99 -Werror-implicit-function-declaration
|
||||
GLOBAL_CFLAGS := --std=gnu99 -Werror-implicit-function-declaration -Wstrict-prototypes
|
||||
#GLOBAL_CFLAGS += -Werror
|
||||
GLOBAL_CPPFLAGS := -fno-exceptions -fno-rtti -fno-threadsafe-statics
|
||||
#GLOBAL_CPPFLAGS += -Weffc++
|
||||
|
||||
@@ -50,7 +50,7 @@ static void call_constructors(void)
|
||||
while (ctor != &__ctor_end) {
|
||||
void (*func)(void);
|
||||
|
||||
func = (void (*)())*ctor;
|
||||
func = (void (*)(void))*ctor;
|
||||
|
||||
func();
|
||||
ctor++;
|
||||
|
||||
@@ -93,7 +93,7 @@ void debug_set_trace_level(int trace_type, int level)
|
||||
*REG32(DEBUG_SET_TRACELEVEL_CPU + trace_type * 4) = level;
|
||||
}
|
||||
|
||||
uint32_t debug_cycle_count()
|
||||
uint32_t debug_cycle_count(void)
|
||||
{
|
||||
return *REG32(DEBUG_CYCLE_COUNT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user