diff mbox

[08/32] iwpmd: use proper ANSI-C prototypes for functions without arguments

Message ID 1476381095-20041-9-git-send-email-hch@lst.de (mailing list archive)
State Accepted
Headers show

Commit Message

Christoph Hellwig Oct. 13, 2016, 5:51 p.m. UTC
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 iwpmd/iwarp_pm_common.c |  2 +-
 iwpmd/iwarp_pm_server.c | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Steve Wise Oct. 13, 2016, 6:06 p.m. UTC | #1
> -----Original Message-----
> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> owner@vger.kernel.org] On Behalf Of Christoph Hellwig
> Sent: Thursday, October 13, 2016 12:51 PM
> To: linux-rdma@vger.kernel.org
> Subject: [PATCH 08/32] iwpmd: use proper ANSI-C prototypes for functions
without
> arguments
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Is this fixing some warning?

Looks fine.

Reviewed-by: Steve Wise <swise@opengridcomputing.com>



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoph Hellwig Oct. 13, 2016, 6:09 p.m. UTC | #2
On Thu, Oct 13, 2016 at 01:06:25PM -0500, Steve Wise wrote:
> Is this fixing some warning?

Yes, this fixes warnings when running the code through sparse:

../iwpmd/iwarp_pm_common.c:215:27: warning: non-ANSI function declaration of
function 'create_netlink_socket'
../iwpmd/iwarp_pm_server.c:90:33: warning: non-ANSI function declaration of
function 'iwpm_mapping_reqs_handler'
../iwpmd/iwarp_pm_server.c:142:33: warning: non-ANSI function declaration of
function 'iwpm_pending_msgs_handler'
../iwpmd/iwarp_pm_server.c:1282:30: warning: non-ANSI function declaration of
function 'iwarp_port_mapper'
../iwpmd/iwarp_pm_server.c:1359:35: warning: non-ANSI function declaration of
function 'daemonize_iwpm_server'
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jason Gunthorpe Oct. 13, 2016, 6:24 p.m. UTC | #3
On Thu, Oct 13, 2016 at 08:09:59PM +0200, 'Christoph Hellwig' wrote:
> On Thu, Oct 13, 2016 at 01:06:25PM -0500, Steve Wise wrote:
> > Is this fixing some warning?
> 
> Yes, this fixes warnings when running the code through sparse:
> 
> ../iwpmd/iwarp_pm_common.c:215:27: warning: non-ANSI function declaration of
> function 'create_netlink_socket'

Once these are all fixed, lets turn on -Wstrict-prototypes for gcc?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoph Hellwig Oct. 13, 2016, 6:25 p.m. UTC | #4
On Thu, Oct 13, 2016 at 12:24:20PM -0600, Jason Gunthorpe wrote:
> On Thu, Oct 13, 2016 at 08:09:59PM +0200, 'Christoph Hellwig' wrote:
> > On Thu, Oct 13, 2016 at 01:06:25PM -0500, Steve Wise wrote:
> > > Is this fixing some warning?
> > 
> > Yes, this fixes warnings when running the code through sparse:
> > 
> > ../iwpmd/iwarp_pm_common.c:215:27: warning: non-ANSI function declaration of
> > function 'create_netlink_socket'
> 
> Once these are all fixed, lets turn on -Wstrict-prototypes for gcc?

Those are fixed with my full series.  Which you won't see for now
as the mail server crapped out after the first 15, so I'll let people
review and merge that batch before spamming the list again.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/iwpmd/iwarp_pm_common.c b/iwpmd/iwarp_pm_common.c
index 3a885d8..aa6b4a0 100644
--- a/iwpmd/iwarp_pm_common.c
+++ b/iwpmd/iwarp_pm_common.c
@@ -212,7 +212,7 @@  create_socket_v6_exit:
 /**
  * create_netlink_socket - Create netlink socket for the iwarp port mapper
  */
-int create_netlink_socket()
+int create_netlink_socket(void)
 {
 	sockaddr_union bind_addr;
 	struct sockaddr_nl *bind_nl;
diff --git a/iwpmd/iwarp_pm_server.c b/iwpmd/iwarp_pm_server.c
index deed3e7..89d3ee5 100644
--- a/iwpmd/iwarp_pm_server.c
+++ b/iwpmd/iwarp_pm_server.c
@@ -87,7 +87,7 @@  void iwpm_signal_handler(int signum)
 /**
  * iwpm_mapping_reqs_handler - Handle mapping requests timeouts and retries
  */
-void *iwpm_mapping_reqs_handler()
+void *iwpm_mapping_reqs_handler(void)
 {
 	iwpm_mapping_request *iwpm_map_req, *next_map_req;
 	int ret = 0;
@@ -139,7 +139,7 @@  mapping_reqs_handler_exit:
 /**
  * iwpm_pending_msgs_handler - Handle sending iwarp port mapper wire messages
  */
-void *iwpm_pending_msgs_handler()
+void *iwpm_pending_msgs_handler(void)
 {
 	iwpm_pending_msg *pending_msg;
 	iwpm_send_msg *send_msg;
@@ -1279,7 +1279,7 @@  static void iwpm_cleanup(void)
 /**
  * iwarp_port_mapper - Distribute work orders for processing different types of iwpm messages
  */
-static int iwarp_port_mapper()
+static int iwarp_port_mapper(void)
 {
 	fd_set select_fdset; /* read fdset */
 	struct timeval select_timeout;
@@ -1355,8 +1355,8 @@  iwarp_port_mapper_exit:
 
 /**
  * daemonize_iwpm_server - Make iwarp port mapper a daemon process
- */
-static void daemonize_iwpm_server()
+ */ 
+static void daemonize_iwpm_server(void)
 {
 	pid_t pid, sid;