All bad cases are fixed now. This is useful to detect non-ISO function signatures which use surprising and counter intuitive rules. Signed-off-by: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx> --- CMakeLists.txt | 7 +++++++ ibacm/src/acm.c | 2 +- ibacm/src/acme.c | 2 +- ibacm/src/libacm.h | 2 +- libibverbs/examples/xsrq_pingpong.c | 4 ++-- librdmacm/cma.h | 4 ++-- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d291d2c3fb7..1fb634c43991 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -246,6 +246,13 @@ if (NOT LIBC_HAS_LIBRT) endif() #------------------------- +# Final warning flags + +# Old version of cmake used 'main(){..}' as their test program which breaks with -Werror. +# So set this flag last. +RDMA_AddOptCFlag(CMAKE_C_FLAGS HAVE_C_WSTRICT_PROTOTYPES "-Wstrict-prototypes") + +#------------------------- # Build Prep # Write out a git ignore file to the build directory if it isn't the source # directory. For developer convenience diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c index 146fbff61857..9186677fcc6f 100644 --- a/ibacm/src/acm.c +++ b/ibacm/src/acm.c @@ -2421,7 +2421,7 @@ static void acm_event_handler(struct acmc_device *dev) ibv_ack_async_event(&event); } -static void acm_activate_devices() +static void acm_activate_devices(void) { struct acmc_device *dev; DLIST_ENTRY *dev_entry; diff --git a/ibacm/src/acme.c b/ibacm/src/acme.c index e96d36ff9fc0..2bce0da4ec8a 100644 --- a/ibacm/src/acme.c +++ b/ibacm/src/acme.c @@ -512,7 +512,7 @@ static void show_path(struct ibv_path_record *path) printf(" packet lifetime: %d\n", path->packetlifetime & 0x1F); } -static uint32_t get_resolve_flags() +static uint32_t get_resolve_flags(void) { uint32_t flags = 0; diff --git a/ibacm/src/libacm.h b/ibacm/src/libacm.h index 359a6af3bb29..4ef2859fa9d6 100644 --- a/ibacm/src/libacm.h +++ b/ibacm/src/libacm.h @@ -34,7 +34,7 @@ #include <infiniband/acm.h> int ib_acm_connect(char *dest_svc); -void ib_acm_disconnect(); +void ib_acm_disconnect(void); int ib_acm_resolve_name(char *src, char *dest, struct ibv_path_data **paths, int *count, uint32_t flags, diff --git a/libibverbs/examples/xsrq_pingpong.c b/libibverbs/examples/xsrq_pingpong.c index c22893e0e721..b90f0eb7e27f 100644 --- a/libibverbs/examples/xsrq_pingpong.c +++ b/libibverbs/examples/xsrq_pingpong.c @@ -354,7 +354,7 @@ static int send_termination_ack(int index) return 0; } -static int pp_client_termination() +static int pp_client_termination(void) { if (send_termination_ack(0)) return 1; @@ -364,7 +364,7 @@ static int pp_client_termination() return 0; } -static int pp_server_termination() +static int pp_server_termination(void) { int i; diff --git a/librdmacm/cma.h b/librdmacm/cma.h index c2f603d6f439..1610e178dfdb 100644 --- a/librdmacm/cma.h +++ b/librdmacm/cma.h @@ -138,8 +138,8 @@ extern int af_ib_support; #define RAI_ROUTEONLY 0x01000000 -void ucma_ib_init(); -void ucma_ib_cleanup(); +void ucma_ib_init(void); +void ucma_ib_cleanup(void); void ucma_ib_resolve(struct rdma_addrinfo **rai, struct rdma_addrinfo *hints); struct ib_connect_hdr { -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html