mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
libDtHelp: Resolve 11 compiler warnings.
This commit is contained in:
parent
917e6cfc49
commit
f8f04a5977
4 changed files with 10 additions and 6 deletions
|
@ -1377,7 +1377,7 @@ _DtHelpCeGetCcdfDocStamp (
|
||||||
*ret_time = (char *) malloc (sizeof(time_t) * 3 + 1);
|
*ret_time = (char *) malloc (sizeof(time_t) * 3 + 1);
|
||||||
if (*ret_time != NULL)
|
if (*ret_time != NULL)
|
||||||
{
|
{
|
||||||
sprintf(*ret_time, "%u", buf.st_mtime);
|
sprintf(*ret_time, "%u", (unsigned) buf.st_mtime);
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,10 @@ char * _DtCliSrvGetDtUserSession()
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
*display = 0;
|
*display = 0;
|
||||||
fgets(display, BUFSIZ, pp);
|
if(NULL == fgets(display, BUFSIZ, pp)) {
|
||||||
|
perror("fgets() failed to read");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
while (isspace(display[strlen(display)-1]))
|
while (isspace(display[strlen(display)-1]))
|
||||||
display[strlen(display)-1] = 0;
|
display[strlen(display)-1] = 0;
|
||||||
pclose(pp);
|
pclose(pp);
|
||||||
|
|
|
@ -1074,7 +1074,7 @@ done:
|
||||||
}
|
}
|
||||||
/* WARNING: depends on pointers and integers the same size */
|
/* WARNING: depends on pointers and integers the same size */
|
||||||
#ifdef __LP64__
|
#ifdef __LP64__
|
||||||
return (NULL == ((int64_t)hit|(int64_t)posFile|(int64_t)locationIdList)) ? -1 : 0;
|
return (0 == ((int64_t)hit|(int64_t)posFile|(int64_t)locationIdList)) ? -1 : 0;
|
||||||
#else
|
#else
|
||||||
return (0 == ((int)hit|(int)posFile|(int)locationIdList)) ? -1 : 0;
|
return (0 == ((int)hit|(int)posFile|(int)locationIdList)) ? -1 : 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "bufioI.h"
|
#include "bufioI.h"
|
||||||
|
|
||||||
|
@ -62,7 +63,7 @@ extern int errno;
|
||||||
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FileDes(f) ((int) (f)->hidden)
|
#define FileDes(f) ((intptr_t) (f)->hidden)
|
||||||
#define CompressFileDes(f) (((CECompressInfoPtr) (f)->hidden)->fd)
|
#define CompressFileDes(f) (((CECompressInfoPtr) (f)->hidden)->fd)
|
||||||
#define CompressSize(f) (((CECompressInfoPtr) (f)->hidden)->size)
|
#define CompressSize(f) (((CECompressInfoPtr) (f)->hidden)->size)
|
||||||
|
|
||||||
|
@ -122,7 +123,7 @@ _DtHelpCeBufFileOpenWr (int fd)
|
||||||
{
|
{
|
||||||
BufFilePtr f;
|
BufFilePtr f;
|
||||||
|
|
||||||
f = _DtHelpCeBufFileCreate ((char *) fd, BufFileRawFlush, NULL, _DtHelpCeBufFileFlush);
|
f = _DtHelpCeBufFileCreate ((char *) (intptr_t) fd, BufFileRawFlush, NULL, _DtHelpCeBufFileFlush);
|
||||||
f->bufp = f->buffer;
|
f->bufp = f->buffer;
|
||||||
f->left = BUFFILESIZE;
|
f->left = BUFFILESIZE;
|
||||||
return f;
|
return f;
|
||||||
|
@ -316,7 +317,7 @@ _DtHelpCeBufFileCreate (
|
||||||
BufFilePtr
|
BufFilePtr
|
||||||
_DtHelpCeBufFileRdWithFd (int fd)
|
_DtHelpCeBufFileRdWithFd (int fd)
|
||||||
{
|
{
|
||||||
return _DtHelpCeBufFileCreate ((char *) fd, FdRawRead, BufFileRawSkip, FdClose);
|
return _DtHelpCeBufFileCreate ((char *) (intptr_t) fd, FdRawRead, BufFileRawSkip, FdClose);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
Loading…
Reference in a new issue