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

libtt: Resolve some compiler warnings

This commit is contained in:
Peter Howkins 2018-03-28 21:34:08 +01:00
parent 5dc346b033
commit 50a96959f0
3 changed files with 6 additions and 4 deletions

View file

@ -42,6 +42,7 @@
* be growing the array when out of room. * be growing the array when out of room.
*/ */
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "api/c/api_storage.h" #include "api/c/api_storage.h"
@ -63,7 +64,7 @@ mark()
_Tt_api_stg_stack_elm_ptr e = new _Tt_api_stg_stack_elm; _Tt_api_stg_stack_elm_ptr e = new _Tt_api_stg_stack_elm;
e->entry_type = _Tt_api_stg_stack_elm::STACK_MARK; e->entry_type = _Tt_api_stg_stack_elm::STACK_MARK;
e->addr = (caddr_t) result; e->addr = (caddr_t) (intptr_t) result;
stack->push(e); stack->push(e);
return result; return result;
} }
@ -83,7 +84,7 @@ release(int mark)
if (c->entry_type == _Tt_api_stg_stack_elm::STACK_MARK) if (c->entry_type == _Tt_api_stg_stack_elm::STACK_MARK)
/* It is better to promote mark to caddr_t than to demote addr /* It is better to promote mark to caddr_t than to demote addr
field for a 64 bit arch */ field for a 64 bit arch */
if (c->addr == (caddr_t) mark) { if (c->addr == (caddr_t) (intptr_t) mark) {
found = 1; found = 1;
} }
} }

View file

@ -552,6 +552,7 @@
# define OPT_AUTOMOUNT_PATH_FIX # define OPT_AUTOMOUNT_PATH_FIX
# define OPT_BUG_RPCINTR # define OPT_BUG_RPCINTR
# undef OPT_XTHREADS # undef OPT_XTHREADS
# define OPT_CONST_CORRECT
#elif defined(__OpenBSD__) #elif defined(__OpenBSD__)

View file

@ -90,7 +90,7 @@ iscntl(isfd, func, va_alist)
va_dcl va_dcl
#endif #endif
{ {
extern int (*_isfatal_error_set_func())(); extern int ( *_isfatal_error_set_func)();
va_list pvar; va_list pvar;
int ret; int ret;
@ -106,7 +106,7 @@ iscntl(isfd, func, va_alist)
break; break;
case ISCNTL_FATAL: case ISCNTL_FATAL:
ret = (int)_isfatal_error_set_func(va_arg(pvar, intfunc)); ret = _isfatal_error_set_func(va_arg(pvar, intfunc));
break; break;
case ISCNTL_FDLIMIT_SET: case ISCNTL_FDLIMIT_SET: