libtt: Resolve some compiler warnings
authorPeter Howkins <flibble@users.sf.net>
Wed, 28 Mar 2018 20:34:08 +0000 (21:34 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 28 Mar 2018 20:34:08 +0000 (21:34 +0100)
cde/lib/tt/lib/api/c/api_storage.C
cde/lib/tt/lib/tt_options.h
cde/lib/tt/mini_isam/iscntl.c

index 45d53e8b228dfb4ecafedd6640e8c8c07a16b6e3..688585dd066eb819d8890aa75a0c0cbfda064675 100644 (file)
@@ -42,6 +42,7 @@
  * be growing the array when out of room.
  */
 
+#include <stdint.h>
 #include <stdlib.h>
 #include <stdio.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;
        
        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);
        return result;
 }
@@ -83,7 +84,7 @@ release(int 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
                   field for a 64 bit arch */
-               if (c->addr == (caddr_t) mark) {
+               if (c->addr == (caddr_t) (intptr_t) mark) {
                    found = 1;
                }
        }
index 5bc87dbf244568a9f670627fc9809844950d4791..8523d027f5b941e6ce37afd90620b9e25122c286 100644 (file)
 # define OPT_AUTOMOUNT_PATH_FIX
 # define OPT_BUG_RPCINTR
 # undef  OPT_XTHREADS 
+# define OPT_CONST_CORRECT
 
 #elif defined(__OpenBSD__)
 
index 0792953800d2a153d421fa4f0a4c6f3c6b0a748c..e0ecc5a1d54c8e43b2099cda7ae40cc254f0da0f 100644 (file)
@@ -90,7 +90,7 @@ iscntl(isfd, func, va_alist)
     va_dcl
 #endif
 {
-    extern int         (*_isfatal_error_set_func())();
+    extern             int ( *_isfatal_error_set_func)();
     va_list            pvar;
     int                        ret;
 
@@ -106,7 +106,7 @@ iscntl(isfd, func, va_alist)
            break;
 
          case ISCNTL_FATAL:
-           ret =  (int)_isfatal_error_set_func(va_arg(pvar,  intfunc));
+           ret =  _isfatal_error_set_func(va_arg(pvar,  intfunc));
            break;
 
          case ISCNTL_FDLIMIT_SET: