diff uip/mhn.c @ 16:07f8972434be

fix for Yosemita Clang
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 12 Nov 2014 02:46:27 +0900
parents 3c5835cca094
children
line wrap: on
line diff
--- a/uip/mhn.c	Thu May 03 17:09:32 2012 +0900
+++ b/uip/mhn.c	Wed Nov 12 02:46:27 2014 +0900
@@ -342,7 +342,7 @@
 
 static CT	get_content ();
 static int	list_content (), show_content (), store_content ();
-static int	cache_content ();
+static void	cache_content ();
 static int	user_content (), compose_content (), output_content ();
 static void	free_content (), flush_errors (), set_id ();
 
@@ -419,7 +419,7 @@
 
 /*  */
 
-    while (cp = *argp++) {
+    while ((cp = *argp++)) {
 	if (*cp == '-')
 	    switch (smatch (++cp, switches)) {
 		case AMBIGSW: 
@@ -667,8 +667,8 @@
 	if (f2 || f3 || f4 || f5 || f6 || f7)
 	    adios (NULLCP, "missing -viamail \"mailpath\" switch");
 
-    if (cp = getenv ("MHN")) {
-	if (fp = fopen (cp, "r")) {
+    if ((cp = getenv ("MHN"))) {
+	if ((fp = fopen (cp, "r"))) {
 	    m_readefs ((struct node **) 0, fp, cp, 0);
 
 	    (void) fclose (fp);
@@ -676,7 +676,7 @@
 	else
 	    admonish ("", "unable to read $MHN profile (%s)", cp);
     }
-    if (fp = fopen (cp = libpath ("mhn_defaults"), "r")) {
+    if ((fp = fopen (cp = libpath ("mhn_defaults"), "r"))) {
 	m_readefs ((struct node **) 0, fp, cp, 0);
 
 	(void) fclose (fp);
@@ -723,7 +723,7 @@
 	    adios (NULLCP, "out of memory");
 
 	ctp = cts;
-	if (stdinP = (strcmp (file, "-") == 0)) {
+	if ((stdinP = (strcmp (file, "-") ) == 0)) {
 	    char    buffer[BUFSIZ];
 
 	    file = add (m_tmpfil (invo_name), NULLCP);
@@ -751,7 +751,7 @@
 	    if ((fp = fopen (file, "r")) == NULL)
 		adios (file, "unable to read");
 
-	if (ct = get_content (fp, file, 1)) {
+	if ((ct = get_content (fp, file, 1))) {
 	    if (stdinP)
 		ct -> c_unlink = 1;
 
@@ -3190,7 +3190,7 @@
     NULL,	    CHARSET_UNKNOWN		/* this one must be last! */
 };
 
-static int  free_text (ct)
+static void  free_text (ct)
 register CT	ct;
 {
     register struct text *t = (struct text *) ct -> c_ctparams;
@@ -3686,7 +3686,7 @@
 			   *next;
 
     if (!m)
-	return;
+	return 0;
 
     if (m -> mp_start)
 	free (m -> mp_start);
@@ -3704,6 +3704,7 @@
 
     free ((char *) m);
     ct -> c_ctparams = NULL;
+    return 0;
 }
 
 
@@ -4095,7 +4096,7 @@
 }
 
 
-static int  free_partial (ct)
+static void  free_partial (ct)
 register CT	ct;
 {
     register struct partial *p = (struct partial *) ct -> c_ctparams;
@@ -4307,7 +4308,7 @@
     register struct exbody *e = (struct exbody *) ct -> c_ctparams;
 
     if (!e)
-	return;
+	return 0;
 
     free_content (e -> eb_content);
     if (e -> eb_body)
@@ -4315,6 +4316,7 @@
 
     free ((char *) e);
     ct -> c_ctparams = NULL;
+    return 0;
 }
 
 
@@ -4705,12 +4707,13 @@
     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
 
     if (!ce)
-	return;
+	return 0;
 
     if (ce -> ce_fp) {
 	(void) fclose (ce -> ce_fp);
 	ce -> ce_fp = NULL;
     }
+    return 0;
 }
 
 
@@ -4757,7 +4760,7 @@
     register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
 
     if (!ce)
-	return;
+	return 0;
 
     if (ce -> ce_fp) {
 	(void) fclose (ce -> ce_fp);
@@ -4776,6 +4779,7 @@
     }
     else
 	ct -> c_ceopenfnx = NULL;
+    return 0;
 }
 
 
@@ -6152,7 +6156,7 @@
 
 /*  */
 
-static int  cache_content (ct)
+static void  cache_content (ct)
 register CT    ct;
 {
     int	    cachetype;