Index: trunk/src/dnmalloc.c
===================================================================
--- trunk/src/dnmalloc.c	(revision 361)
+++ trunk/src/dnmalloc.c	(revision 362)
@@ -6,4 +6,5 @@
       Email: dnmalloc@fort-knox.org
       Address:
+#if defined(WITH_TPT) 
       	     Yves Younan
       	     Celestijnenlaan 200A
@@ -4508,9 +4509,15 @@
 
     else {
+#if  PARANOIA > 0
       int ret;
+#endif
       INTERNAL_SIZE_T offset = (INTERNAL_SIZE_T) p->hash_next;
       av->n_mmaps--;
       av->mmapped_mem -= (size + offset);
+#if  PARANOIA > 0
       ret = munmap((char*) chunk(p) - offset, size + offset);
+#else
+      munmap((char*) chunk(p) - offset, size + offset);
+#endif
       hashtable_remove_mmapped(chunk(p));
       freecilst_add(p);
@@ -5007,5 +5014,7 @@
   CHUNK_SIZE_T    remainder_size; /* its size */
   INTERNAL_SIZE_T size;
+#if PARANOIA > 2
   mstate          av;
+#endif
 
   /* If need less alignment than we give anyway, just relay to malloc */
@@ -5038,5 +5047,7 @@
   if (m == 0) return 0; /* propagate failure */
 
+#if PARANOIA > 2
   av = get_malloc_state();
+#endif
 
   p = hashtable_lookup((mchunkptr) m);
Index: trunk/src/sh_database.c
===================================================================
--- trunk/src/sh_database.c	(revision 361)
+++ trunk/src/sh_database.c	(revision 362)
@@ -1244,5 +1244,4 @@
   char * values;
 
-  int    status;
   long   the_id;
   int    size;
@@ -1445,5 +1444,5 @@
 		      db_table, columns, values);
 
-  status = sh_database_query (query, &the_id);
+  sh_database_query (query, &the_id);
 
   /*@-usedef@*//* no, 'values' is allocated here */
Index: trunk/src/sh_err_console.c
===================================================================
--- trunk/src/sh_err_console.c	(revision 361)
+++ trunk/src/sh_err_console.c	(revision 362)
@@ -69,6 +69,6 @@
 {
   key_t            key;
-  int              error;
-#if defined(WITH_TPT) 
+#if defined(WITH_TPT) 
+  int              error = 0;
   char errbuf[SH_ERRBUF_SIZE];
 #endif
@@ -81,5 +81,7 @@
   if (key == (key_t) -1)
     {
+#if defined(WITH_TPT) 
       error = errno;
+#endif
       TPT(( 0, FIL__, __LINE__, _("msg=<ftok: %s> errno=<%d>\n"), 
 	    sh_error_message(error, errbuf, sizeof(errbuf)), error));
@@ -93,5 +95,7 @@
   if (msgid < 0)
     {
+#if defined(WITH_TPT) 
       error = errno;
+#endif
       TPT(( 0, FIL__, __LINE__, _("msg=<msgget: %s> errno=<%d>\n"), 
 	    sh_error_message(error, errbuf, sizeof(errbuf)), error));
@@ -132,7 +136,7 @@
   int              rc       = -1;
   static int       status   = -1;
-  int              error;
   int              count    = 0;
 #if defined(WITH_TPT) 
+  int              error = 0;
   char errbuf[SH_ERRBUF_SIZE];
 #endif
@@ -205,5 +209,7 @@
       else
 	{
+#if defined(WITH_TPT) 
 	  error = errno;
+#endif
 	  TPT(( 0, FIL__, __LINE__, _("msg=<msgsnd: %s> errno=<%d>\n"), 
 		sh_error_message(error, errbuf, sizeof(errbuf)), error));
Index: trunk/src/sh_files.c
===================================================================
--- trunk/src/sh_files.c	(revision 361)
+++ trunk/src/sh_files.c	(revision 362)
@@ -76,5 +76,5 @@
 static char * sh_files_C_dequote (char * s, size_t * length)
 {
-  size_t i, j, len = *length;
+  size_t i, len = *length;
   int    flag = 0;
   char  *p, *q, *po, *pend;
@@ -96,5 +96,5 @@
   po = SH_ALLOC(len+1); *po = '\0'; p = po; pend = &po[len];
 
-  i = 0; j = 0; q = s;
+  i = 0; q = s;
 
   do
Index: trunk/src/sh_hash.c
===================================================================
--- trunk/src/sh_hash.c	(revision 361)
+++ trunk/src/sh_hash.c	(revision 362)
@@ -435,5 +435,4 @@
   char hashbuf[KEYBUF_SIZE];
   int  retval;
-  volatile int flag = 0;
 
   /* --------  find the entry for the file ----------------       */
@@ -462,5 +461,5 @@
   sh_error_handle (level, FIL__, __LINE__, 0, 
 		   MSG_FI_MISS2, tmp, str);
-  flag = 1;
+
   SH_FREE(tmp);
   SH_FREE(str);
@@ -1302,6 +1301,4 @@
   extern int get_the_fd (SL_TICKET ticket);
 
-  int    flag_pgp;
-  int    flag_nohead;
   SL_TICKET fdTmp = (-1);
 #endif
@@ -1314,9 +1311,4 @@
 
   SH_MUTEX_LOCK(mutex_hash);
-
-#if defined(WITH_GPG) || defined(WITH_PGP)
-  flag_pgp = S_FALSE;
-  flag_nohead = S_FALSE;
-#endif
 
   if (IsInit == 1)
@@ -3885,5 +3877,5 @@
   size_t size       = 0;
   size_t flag_quote = 0;
-  int    flag_comma = 0;
+
   char * new;
   char * pnew;
@@ -3894,7 +3886,5 @@
       while (*p) 
 	{
-	  if (*p == ',')
-	    flag_comma = 1;
-	  else if (*p == '"')
+	  if (*p == '"')
 	    ++flag_quote;
 	  
Index: trunk/src/sh_kern.c
===================================================================
--- trunk/src/sh_kern.c	(revision 361)
+++ trunk/src/sh_kern.c	(revision 362)
@@ -848,7 +848,7 @@
 
   unsigned short idt_offset_lo, idt_offset_hi, idt_selector;
-  unsigned char  idt_reserved, idt_flag;
+  unsigned char  /* idt_reserved, */ idt_flag;
   unsigned short sh_idt_offset_lo, sh_idt_offset_hi, sh_idt_selector;
-  unsigned char  sh_idt_reserved, sh_idt_flag;
+  unsigned char  /* sh_idt_reserved, */ sh_idt_flag;
   int            dpl;
   unsigned long  idt_iaddr;
@@ -889,5 +889,5 @@
 	      sh_idt_offset_lo = *((unsigned short *) &sh_idt_table[i]);
 	      sh_idt_selector  = *((unsigned short *) &sh_idt_table[i+2]);
-	      sh_idt_reserved  = (unsigned char) sh_idt_table[i+4];
+	      /* sh_idt_reserved  = (unsigned char) sh_idt_table[i+4]; */
 	      sh_idt_flag      = (unsigned char) sh_idt_table[i+5];
 	      sh_idt_offset_hi = *((unsigned short *) &sh_idt_table[i+6]);
@@ -919,5 +919,5 @@
 		  idt_offset_lo = *((unsigned short *) &idt_table[i]);
 		  idt_selector  = *((unsigned short *) &idt_table[i+2]);
-		  idt_reserved  = (unsigned char) idt_table[i+4];
+		  /* idt_reserved  = (unsigned char) idt_table[i+4]; */
 		  idt_flag      = (unsigned char) idt_table[i+5];
 		  idt_offset_hi = *((unsigned short *) &idt_table[i+6]);
Index: trunk/src/sh_log_check.c
===================================================================
--- trunk/src/sh_log_check.c	(revision 361)
+++ trunk/src/sh_log_check.c	(revision 362)
@@ -1027,5 +1027,6 @@
  *  Reader for binary files 
  */
-sh_string * sh_binary_reader (void * s, size_t size, struct sh_logfile * logfile)
+sh_string * sh_binary_reader (void * s, size_t size, 
+			      struct sh_logfile * logfile)
 {
   size_t         status;
@@ -1040,4 +1041,5 @@
       if (status != 1)
 	{
+	  memset(s, '\0', size);
 	  if (ferror(logfile->fp) && (logfile->flags & SH_LOGFILE_PIPE) == 0)
 	    {
@@ -1053,5 +1055,4 @@
 	  sl_fclose(FIL__, __LINE__, logfile->fp);
 	  logfile->fp = NULL;
-	  memset(s, '\0', size);
 	  return NULL;
 	}
@@ -1387,7 +1388,9 @@
       retval = -1;
     }
-
-  sh_logmon_interval = (time_t) val;
-  SL_RETURN(0, _("sh_logmon_set_interval"));
+  else
+    {
+      sh_logmon_interval = (time_t) val;
+    }
+  SL_RETURN(retval, _("sh_logmon_set_interval"));
 }
 
Index: trunk/src/sh_log_parse_apache.c
===================================================================
--- trunk/src/sh_log_parse_apache.c	(revision 361)
+++ trunk/src/sh_log_parse_apache.c	(revision 362)
@@ -65,4 +65,5 @@
 static void * sh_dummy_new = NULL;
 static void * sh_dummy_fti = NULL;
+static void * sh_dummy_ftr = NULL;
 
 void * sh_eval_fileinfo_apache(char * str)
@@ -89,4 +90,5 @@
   sh_dummy_new = (void*) &new;
   sh_dummy_fti = (void*) &f_time;
+  sh_dummy_ftr = (void*) &result;
 
   if (0 == strncmp("common", str, 6))
Index: trunk/src/sh_log_parse_generic.c
===================================================================
--- trunk/src/sh_log_parse_generic.c	(revision 361)
+++ trunk/src/sh_log_parse_generic.c	(revision 362)
@@ -47,5 +47,4 @@
 {
   struct tm ts;
-  struct tm * ts_p;
   char   tmp[80];
   size_t len;
@@ -54,8 +53,7 @@
   
 #if defined(HAVE_PTHREAD) && defined (_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_LOCALTIME_R)
-  ts_p = localtime_r (&(record->timestamp), &ts);
+  localtime_r (&(record->timestamp), &ts);
 #else
-  ts_p = localtime (&(record->timestamp));
-  memcpy(&ts, ts_p, sizeof(struct tm));
+  memcpy(&ts, localtime(&(record->timestamp)), sizeof(struct tm));
 #endif
   len = strftime(tmp, sizeof(tmp), _("%Y-%m-%dT%H:%M:%S"), &ts);
Index: trunk/src/sh_mail.c
===================================================================
--- trunk/src/sh_mail.c	(revision 361)
+++ trunk/src/sh_mail.c	(revision 362)
@@ -1863,5 +1863,4 @@
 static dnsrep * return_mx (char *domain)
 {
-  struct hostent *host;
   dnsrep * answers = NULL;
   mx     * result;
@@ -1908,5 +1907,4 @@
 
       retval = NULL;
-      host   = NULL;
 
       if (domain != NULL)
Index: trunk/src/sh_portcheck.c
===================================================================
--- trunk/src/sh_portcheck.c	(revision 361)
+++ trunk/src/sh_portcheck.c	(revision 362)
@@ -193,7 +193,9 @@
       retval = -1;
     }
-
-  sh_portchk_interval = (time_t) val;
-  SL_RETURN(0, _("sh_portchk_set_interval"));
+  else
+    {
+      sh_portchk_interval = (time_t) val;
+    }
+  SL_RETURN(retval, _("sh_portchk_set_interval"));
 }
 
@@ -213,7 +215,9 @@
       retval = -1;
     }
-
-  *setthis = (int) val;
-  SL_RETURN(0, _("sh_portchk_set_port_minmax"));
+  else
+    {
+      *setthis = (int) val;
+    }
+  SL_RETURN(retval, _("sh_portchk_set_port_minmax"));
 }
 
Index: trunk/src/sh_processcheck.c
===================================================================
--- trunk/src/sh_processcheck.c	(revision 361)
+++ trunk/src/sh_processcheck.c	(revision 362)
@@ -632,7 +632,9 @@
       retval = -1;
     }
-
-  sh_prochk_interval = (time_t) val;
-  SL_RETURN(0, _("sh_prochk_set_interval"));
+  else
+    {
+      sh_prochk_interval = (time_t) val;
+    }
+  SL_RETURN(retval, _("sh_prochk_set_interval"));
 }
 
Index: trunk/src/sh_socket.c
===================================================================
--- trunk/src/sh_socket.c	(revision 361)
+++ trunk/src/sh_socket.c	(revision 362)
@@ -1126,5 +1126,4 @@
 char * sh_socket_check(const char * client_name)
 {
-  struct socket_cmd * old = cmdlist;
   struct socket_cmd * new = cmdlist;
   static char         out[SH_MAXMSGLEN];
@@ -1139,5 +1138,4 @@
 	  return out;
 	}
-      old = new;
       new = new->next;
     }
Index: trunk/src/sh_unix.c
===================================================================
--- trunk/src/sh_unix.c	(revision 361)
+++ trunk/src/sh_unix.c	(revision 362)
@@ -2169,5 +2169,5 @@
   struct tm   aa;
   struct tm   bb;
-  struct tm * cc;
+
   int  sign =  0;
   int  diff =  0;
@@ -2178,15 +2178,13 @@
 
 #if defined(HAVE_PTHREAD) && defined (_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_GMTIME_R)
-  cc = gmtime_r (xx, &aa);
-#else
-  cc = gmtime (xx);
-  memcpy (&aa, cc, sizeof(struct tm));
+  gmtime_r (xx, &aa);
+#else
+  memcpy (&aa, gmtime(xx), sizeof(struct tm));
 #endif
 
 #if defined(HAVE_PTHREAD) && defined (_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_LOCALTIME_R)
-  cc = localtime_r (xx, &bb);
-#else
-  cc = localtime (xx);
-  memcpy (&bb, cc, sizeof(struct tm));
+  localtime_r (xx, &bb);
+#else
+  memcpy (&bb, localtime(xx), sizeof(struct tm));
 #endif
 
