Skip to content

Commit

Permalink
* Added -Wmissing-prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
yoogx committed Oct 14, 2020
1 parent fb6b51b commit 34fd0e9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
3 changes: 3 additions & 0 deletions examples/aadlv2/producer-consumer/producer-consumer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#include <time.h>
#include <po_hi_time.h>

void user_produce_spg (int* data);
void user_consume_spg (int data);

void user_produce_spg (int* data)
{
static int produce_data = 42;
Expand Down
2 changes: 1 addition & 1 deletion share/make/Makefile.common.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CYGPATH_W = @CYGPATH_U@
# - -Wextra brings -Wcast-function-type which is a nuisance; we disable it

GCC_GENERIC_CFLAGS= -g -Wall -Wextra -fdiagnostics-show-option -Wcast-align \
-Wswitch -Wno-cast-function-type
-Wswitch -Wno-cast-function-type -Wmissing-prototypes

all: build-node

Expand Down
2 changes: 2 additions & 0 deletions src/po_hi_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#include <deployment.h>
/* included files from the generated code */

#include <po_hi_main.h>
#include <po_hi_time.h>
#include <po_hi_config.h>
#include <po_hi_common.h>
Expand Down
21 changes: 16 additions & 5 deletions src/po_hi_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ int __po_hi_initialize_tasking( )
*/

#if defined (POSIX) || defined (RTEMS_POSIX)
int __po_hi_number_of_cpus (void);

int __po_hi_number_of_cpus (void)
{
int cores = 1;
Expand All @@ -454,11 +456,19 @@ int __po_hi_number_of_cpus (void)
*/

#if defined (POSIX) || defined (RTEMS_POSIX) || defined (XENO_POSIX)
pthread_t __po_hi_posix_create_thread (__po_hi_priority_t priority,
__po_hi_stack_t stack_size,
const __po_hi_int8_t core_id,
void* (*start_routine)(void),
void* arg)
pthread_t __po_hi_posix_create_thread
(__po_hi_priority_t priority,
__po_hi_stack_t stack_size,
const __po_hi_int8_t core_id,
void* (*start_routine)(void),
void* arg);

pthread_t __po_hi_posix_create_thread
(__po_hi_priority_t priority,
__po_hi_stack_t stack_size,
const __po_hi_int8_t core_id,
void* (*start_routine)(void),
void* arg)
{
int policy;
pthread_t tid;
Expand Down Expand Up @@ -568,6 +578,7 @@ pthread_t __po_hi_posix_create_thread (__po_hi_priority_t priority,
return tid;
}

int __po_hi_posix_initialize_task (__po_hi_task_t* task);

int __po_hi_posix_initialize_task (__po_hi_task_t* task)
{
Expand Down

0 comments on commit 34fd0e9

Please sign in to comment.