1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

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.
This commit is contained in:
Jose Rubio 2019-10-11 10:49:48 +02:00
parent f9790767f3
commit 0086a7067e
9 changed files with 19 additions and 15 deletions

View file

@ -89,6 +89,7 @@ extern int errno;
#include "FormatCCDFI.h" #include "FormatCCDFI.h"
#include "FormatSDLI.h" #include "FormatSDLI.h"
#include "StringFuncsI.h" #include "StringFuncsI.h"
#include "FormatI.h"
#ifdef NLS16 #ifdef NLS16

View file

@ -76,10 +76,10 @@ extern int _DtFormatProcessString (
int seg_type, int seg_type,
char **font_attr ); char **font_attr );
extern int _DtHelpFormatToc ( extern int _DtHelpFormatToc (
XtPointer client_data, DtHelpDispAreaStruct *client_data,
_DtHelpVolumeHdl volume, _DtHelpVolumeHdl volume,
char *id_string, char *id_string,
char *ret_id, char **ret_id,
XtPointer *ret_handle); XtPointer *ret_handle);
extern int _DtHelpFormatTopic ( extern int _DtHelpFormatTopic (
XtPointer client_data, XtPointer client_data,

View file

@ -91,6 +91,7 @@
*/ */
#include "bufioI.h" #include "bufioI.h"
#include "Access.h" #include "Access.h"
#include "DisplayAreaP.h"
#include "AccessI.h" #include "AccessI.h"
#include "StringFuncsI.h" #include "StringFuncsI.h"
#include "DisplayAreaI.h" #include "DisplayAreaI.h"

View file

@ -2748,7 +2748,7 @@ void _DtGrRegisterConverter(
*****************************************************************************/ *****************************************************************************/
int _DtGrOpenFile( int _DtGrOpenFile(
_DtGrStream *stream, _DtGrStream *stream,
const char *path) char *path)
{ {
char *fname = NULL; char *fname = NULL;

View file

@ -72,7 +72,7 @@ typedef struct
/* Open a file stream */ /* Open a file stream */
int _DtGrOpenFile( int _DtGrOpenFile(
_DtGrStream *stream, _DtGrStream *stream,
const char *path char *path
); );
/* Open a buffer stream */ /* Open a buffer stream */

View file

@ -71,6 +71,7 @@
#include <Dt/Help.h> #include <Dt/Help.h>
#include "DisplayAreaI.h" #include "DisplayAreaI.h"
#include "DisplayAreaP.h"
#include "StringFuncsI.h" #include "StringFuncsI.h"
#include "HelposI.h" #include "HelposI.h"
#include "HistoryI.h" #include "HistoryI.h"

View file

@ -74,6 +74,7 @@
* private includes * private includes
*/ */
#include "DisplayAreaI.h" #include "DisplayAreaI.h"
#include "DisplayAreaP.h"
#include "bufioI.h" #include "bufioI.h"
#include "Access.h" #include "Access.h"

View file

@ -33,7 +33,7 @@
#define INT_MESSAGE5 " The connection was probably broken by a server shudown or KillClient.\r\n" #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 int PrintXError(Display *dpy, XErrorEvent *event, FILE *fp);
static char *SysErrorMsg(int n); static const char *SysErrorMsg(int n);
/* Error Handlers */ /* Error Handlers */
static int XIOError(Display *dpy); static int XIOError(Display *dpy);
@ -100,7 +100,7 @@ XIOError(
* FUNCTION: * FUNCTION:
* RETURNS: * RETURNS:
*/ */
static char * static const char *
SysErrorMsg( SysErrorMsg(
int n int n
) )
@ -109,7 +109,7 @@ SysErrorMsg(
extern char *sys_errlist[]; extern char *sys_errlist[];
extern int sys_nerr; extern int sys_nerr;
#endif #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"); return (s ? s : "no such error");
} }