dthelp: compiler warning and coverity warning fixes
[oweals/cde.git] / cde / programs / dthelp / parser / pass1 / helptag / help.c
index fc36aab47036d1202b4b7e58f91b7060f9a5e2eb..474a6a0d4492dbc5036a501ad20afff857047536 100644 (file)
@@ -24,6 +24,8 @@
 /*   Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co. */
 /* Miscellaneous Procedures for HP Tag/TeX translator */
 
+#include <stdint.h>
+
 #include "userinc.h"
 #include "globdec.h"
 
@@ -306,7 +308,7 @@ while (TRUE)
     node[n] = current->next;
     if (! id[n])
        {
-       if ((int) current->data >= 0)
+       if ((intptr_t) current->data >= 0)
            m_err1("No glossary definition for %s", id);
        current = current->next;
        while (! current)
@@ -1612,6 +1614,8 @@ else
     }
 
 _DtLcxCloseDb(&myDb);
+free(charset);
+free(lang);
 }
 
 
@@ -2192,13 +2196,13 @@ if (vgloss(gloss) == GLOSS)
        *(termp-1) = M_EOS;
        }
 
-    idn = (int) m_lookfortrie(base ? base : dterm, &gtree);
+    idn = (intptr_t) m_lookfortrie(base ? base : dterm, &gtree);
     if (idn < 0)
        idn = -idn;
     if (!idn)
        {
        idn = NextId();
-       m_ntrtrie(base ? base : dterm, &gtree, (void *) idn);
+       m_ntrtrie(base ? base : dterm, &gtree, (void *) (intptr_t) idn);
        }
     }