Fix to compile warnings.
authorJose Rubio <joserubiovidales@gmail.com>
Fri, 11 Oct 2019 08:49:48 +0000 (10:49 +0200)
committerJose Rubio <joserubiovidales@gmail.com>
Fri, 11 Oct 2019 08:49:48 +0000 (10:49 +0200)
* discarded-qualifiers warnings.
* Function definitions, the .h doesn't match the .c.
* Added some include to ensure the .c has function definition.

cde/lib/DtHelp/Access.c
cde/lib/DtHelp/Format.c
cde/lib/DtHelp/FormatI.h
cde/lib/DtHelp/GlobSearch.c
cde/lib/DtHelp/Graphics.c
cde/lib/DtHelp/GraphicsP.h
cde/lib/DtHelp/History.c
cde/lib/DtHelp/Print.c
cde/programs/dtprintinfo/libUI/MotifUI/Debug.c

index 5b2ac47508e9728278ce9f9c7b06d1c386b6d347..d0b79d6f5ec58a3bcb4db106fb8178608bf0f72f 100644 (file)
@@ -1073,7 +1073,7 @@ _DtHelpCeGetLangSubParts (
  *****************************************************************************/
 int
 _DtHelpCeGetUncompressedFileName (
-       char             *name,
+       char     *name,
        char            **ret_name )
 {
     char *inFile = NULL;
index bb5bf309ac7a2d508ac556f2628477f1ddbff567..50caf7a638843e896445caa56f648f2206ece4c2 100644 (file)
@@ -89,6 +89,7 @@ extern int errno;
 #include "FormatCCDFI.h"
 #include "FormatSDLI.h"
 #include "StringFuncsI.h"
+#include "FormatI.h"
 
 
 #ifdef NLS16
@@ -1177,9 +1178,9 @@ int
 _DtHelpFormatToc (
     DtHelpDispAreaStruct       *pDAS,
     _DtHelpVolumeHdl            volume,
-    char                        *id,
-    char                       **ret_id,
-    XtPointer                   *ret_handle)
+    char                           *id,
+    char                              **ret_id,
+    XtPointer                      *ret_handle)
 {
     int             result   = 0;
     _DtCvTopicPtr    topic = NULL;
index 43d2023ee2007273b8fb2689709102367505510e..cc20b80344d2c57b7fd3e867d24e7b07303fbd88 100644 (file)
@@ -76,11 +76,11 @@ extern      int              _DtFormatProcessString (
                                int       seg_type,
                                char    **font_attr );
 extern int              _DtHelpFormatToc (
-                               XtPointer         client_data,
-                               _DtHelpVolumeHdl     volume,
-                               char            *id_string,
-                               char            *ret_id,
-                               XtPointer       *ret_handle);
+                               DtHelpDispAreaStruct *client_data,
+                               _DtHelpVolumeHdl      volume,
+                               char                 *id_string,
+                               char                **ret_id,
+                               XtPointer            *ret_handle);
 extern int              _DtHelpFormatTopic (
                                XtPointer         client_data,
                                _DtHelpVolumeHdl     volume,
index ef572f4949be334bb7f033534209d1daeab7a269..0a766411055c3120c495f8cc7d20c8ba163f4783 100644 (file)
 
 #include <Dt/Help.h>
 #include <Dt/HelpDialog.h>
-
 /*
  * private includes
  */
 #include "bufioI.h"
 #include "Access.h"
+#include "DisplayAreaP.h"
 #include "AccessI.h"
 #include "StringFuncsI.h"
 #include "DisplayAreaI.h"
index 7f79a4eeb30d2bea094e3291e430eb804b8edbe9..6c0ab1198b0ff6a3eb7467b2f94577e1991f5ad1 100644 (file)
@@ -2748,7 +2748,7 @@ void _DtGrRegisterConverter(
  *****************************************************************************/
 int _DtGrOpenFile(
     _DtGrStream *stream,
-    const char  *path)
+    char  *path)
 {
     char *fname = NULL;
 
index 6848866205dcd35531fcecfd55cb82a9036d0989..fc26ada9fb296ae8c01291b91156ba7959e81571 100644 (file)
@@ -72,7 +72,7 @@ typedef struct
 /* Open a file stream */
 int _DtGrOpenFile(
     _DtGrStream *stream,
-    const char  *path
+    char        *path
 );
 
 /* Open a buffer stream */
index 95a8261e7fbfbe4c6f5540c7d4f3b8031c5d9ade..ea38c0e1e2ea74d3fabc1548b694c5ca306e8b85 100644 (file)
@@ -71,6 +71,7 @@
 
 #include <Dt/Help.h>
 #include "DisplayAreaI.h"
+#include "DisplayAreaP.h"
 #include "StringFuncsI.h"
 #include "HelposI.h"
 #include "HistoryI.h"
index 9dedf01f22dc19452281ebdd21f1cfb3f4dd2737..8714a9153af178d8b30530b60c51f87628d5c75d 100644 (file)
@@ -74,6 +74,7 @@
  * private includes
  */
 #include "DisplayAreaI.h"
+#include "DisplayAreaP.h"
 
 #include "bufioI.h"
 #include "Access.h"
index 769371d46d1d54c887a2274d9f5fa1e8109330d1..4547f2818a87f499051ac42fec1e4d1e3437dfb7 100644 (file)
@@ -33,7 +33,7 @@
 #define INT_MESSAGE5    "    The connection was probably broken by a server shudown or KillClient.\r\n"
 
 static int PrintXError(Display *dpy, XErrorEvent *event, FILE *fp);
-static  char *SysErrorMsg(int n);
+static  const char *SysErrorMsg(int n);
 
 /* Error Handlers */
 static  int XIOError(Display *dpy);
@@ -100,7 +100,7 @@ XIOError(
  *   FUNCTION:
  *   RETURNS:
  */
-static char *
+static const char *
 SysErrorMsg(
    int n
    )
@@ -109,7 +109,7 @@ SysErrorMsg(
     extern char *sys_errlist[];
     extern int sys_nerr;
 #endif
-    char *s = ((n >= 0 && n < sys_nerr) ? sys_errlist[n] : "unknown error");
+    const char *s = ((n >= 0 && n < sys_nerr) ? sys_errlist[n] : "unknown error");
     return (s ? s : "no such error");
 }