From: Jose Rubio Date: Fri, 11 Oct 2019 08:49:48 +0000 (+0200) Subject: Fix to compile warnings. X-Git-Tag: 2.3.1~26^2~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0086a7067e557eeca7953db1f9174127093f7f4a;p=oweals%2Fcde.git Fix to compile warnings. * discarded-qualifiers warnings. * Function definitions, the .h doesn't match the .c. * Added some include to ensure the .c has function definition. --- diff --git a/cde/lib/DtHelp/Access.c b/cde/lib/DtHelp/Access.c index 5b2ac475..d0b79d6f 100644 --- a/cde/lib/DtHelp/Access.c +++ b/cde/lib/DtHelp/Access.c @@ -1073,7 +1073,7 @@ _DtHelpCeGetLangSubParts ( *****************************************************************************/ int _DtHelpCeGetUncompressedFileName ( - char *name, + char *name, char **ret_name ) { char *inFile = NULL; diff --git a/cde/lib/DtHelp/Format.c b/cde/lib/DtHelp/Format.c index bb5bf309..50caf7a6 100644 --- a/cde/lib/DtHelp/Format.c +++ b/cde/lib/DtHelp/Format.c @@ -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; diff --git a/cde/lib/DtHelp/FormatI.h b/cde/lib/DtHelp/FormatI.h index 43d2023e..cc20b803 100644 --- a/cde/lib/DtHelp/FormatI.h +++ b/cde/lib/DtHelp/FormatI.h @@ -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, diff --git a/cde/lib/DtHelp/GlobSearch.c b/cde/lib/DtHelp/GlobSearch.c index ef572f49..0a766411 100644 --- a/cde/lib/DtHelp/GlobSearch.c +++ b/cde/lib/DtHelp/GlobSearch.c @@ -85,12 +85,13 @@ #include
#include
- + /* * private includes */ #include "bufioI.h" #include "Access.h" +#include "DisplayAreaP.h" #include "AccessI.h" #include "StringFuncsI.h" #include "DisplayAreaI.h" diff --git a/cde/lib/DtHelp/Graphics.c b/cde/lib/DtHelp/Graphics.c index 7f79a4ee..6c0ab119 100644 --- a/cde/lib/DtHelp/Graphics.c +++ b/cde/lib/DtHelp/Graphics.c @@ -2748,7 +2748,7 @@ void _DtGrRegisterConverter( *****************************************************************************/ int _DtGrOpenFile( _DtGrStream *stream, - const char *path) + char *path) { char *fname = NULL; diff --git a/cde/lib/DtHelp/GraphicsP.h b/cde/lib/DtHelp/GraphicsP.h index 68488662..fc26ada9 100644 --- a/cde/lib/DtHelp/GraphicsP.h +++ b/cde/lib/DtHelp/GraphicsP.h @@ -72,7 +72,7 @@ typedef struct /* Open a file stream */ int _DtGrOpenFile( _DtGrStream *stream, - const char *path + char *path ); /* Open a buffer stream */ diff --git a/cde/lib/DtHelp/History.c b/cde/lib/DtHelp/History.c index 95a8261e..ea38c0e1 100644 --- a/cde/lib/DtHelp/History.c +++ b/cde/lib/DtHelp/History.c @@ -71,6 +71,7 @@ #include
#include "DisplayAreaI.h" +#include "DisplayAreaP.h" #include "StringFuncsI.h" #include "HelposI.h" #include "HistoryI.h" diff --git a/cde/lib/DtHelp/Print.c b/cde/lib/DtHelp/Print.c index 9dedf01f..8714a915 100644 --- a/cde/lib/DtHelp/Print.c +++ b/cde/lib/DtHelp/Print.c @@ -74,6 +74,7 @@ * private includes */ #include "DisplayAreaI.h" +#include "DisplayAreaP.h" #include "bufioI.h" #include "Access.h" diff --git a/cde/programs/dtprintinfo/libUI/MotifUI/Debug.c b/cde/programs/dtprintinfo/libUI/MotifUI/Debug.c index 769371d4..4547f281 100644 --- a/cde/programs/dtprintinfo/libUI/MotifUI/Debug.c +++ b/cde/programs/dtprintinfo/libUI/MotifUI/Debug.c @@ -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"); }