From 7e446c04daa97588e942b1e33ae5ac1d28a11396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20B=C3=B6gershausen?= Date: Fri, 20 Sep 2019 15:32:29 +0200 Subject: [PATCH] send_mess() uses 'const char *' The 3rd parameter in send_mess(), "name" can and should be a 'const char *' instead of just 'char *'. Modern compilers complain here, so that the signature now gets the const. This is a minimal part of a series from Dirk Zimoch, more warnings can be removed here and there. --- acsApp/src/drvMCB4B.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acsApp/src/drvMCB4B.cc b/acsApp/src/drvMCB4B.cc index d888947..8626bfc 100644 --- a/acsApp/src/drvMCB4B.cc +++ b/acsApp/src/drvMCB4B.cc @@ -68,7 +68,7 @@ int MCB4B_num_cards = 0; /*----------------functions-----------------*/ STATIC int recv_mess(int, char *, int); -STATIC RTN_STATUS send_mess(int, const char *, char *); +STATIC RTN_STATUS send_mess(int, const char *, const char *); STATIC void start_status(int card); STATIC int set_status(int card, int signal); static long report(int level); @@ -264,7 +264,7 @@ STATIC int set_status(int card, int signal) /* Test for post-move string. */ if ((status.Bits.RA_DONE || ls_active == true) && nodeptr != 0 && nodeptr->postmsgptr != 0) { - send_mess(card, nodeptr->postmsgptr, (char*) NULL); + send_mess(card, nodeptr->postmsgptr, NULL); /* The MCB4B always sends back a response, read it and discard */ recv_mess(card, buff, WAIT); nodeptr->postmsgptr = NULL; @@ -279,7 +279,7 @@ STATIC int set_status(int card, int signal) /* send a message to the MCB4B board */ /* send_mess() */ /*****************************************************/ -STATIC RTN_STATUS send_mess(int card, const char *com, char *name) +STATIC RTN_STATUS send_mess(int card, const char *com, const char *name) { struct MCB4Bcontroller *cntrl; size_t nwrite;