diff PubdicPlus/pod.c @ 28:a7ccf412ba02

more warning suppression
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 06 Mar 2010 23:24:53 +0900
parents 466fe6732d8d
children
line wrap: on
line diff
--- a/PubdicPlus/pod.c	Sat Mar 06 18:29:27 2010 +0900
+++ b/PubdicPlus/pod.c	Sat Mar 06 23:24:53 2010 +0900
@@ -20,10 +20,6 @@
  * PERFORMANCE OF THIS SOFTWARE. 
  */
 
-#ifndef lint
-static char rcsid[] = "$Id: pod.c,v 1.7 2005/12/10 18:50:43 aonoto Exp $";
-#endif
-
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #endif
@@ -295,7 +291,7 @@
 {
   register Wchar *p = d, ch;
 
-  while (ch = *s++)
+  while ((ch = *s++))
     {
       *p++ = ch;
     }
@@ -452,7 +448,7 @@
   for (s = str; *s; s++)
     key += (int) *s;
   key = ((unsigned) key & HINSHIBUFINDEXMASK);
-  for (pp = partsofspeech + key; p = *pp; pp = &(p->next))
+  for (pp = partsofspeech + key; (p = *pp); pp = &(p->next))
     {
       if (!Wscmp (p->hinshi, str))
         {
@@ -496,7 +492,7 @@
       (void) fprintf (stderr, "%s: can not open the table file of parts of speech \"%s\".\n", program, hinshi_table);
       exit (1);
     }
-  while (s = Fgetws (readbuf, READBUFSIZE, f))
+  while ((s = Fgetws (readbuf, READBUFSIZE, f)))
     {
       from = extstr (s, &s, 0);
       to = extstr (s, &s, 0);
@@ -657,7 +653,7 @@
   for (s = hin; *s; s++)
     key += (int) *s;
   key = ((unsigned) key & HINSHIBUFINDEXMASK);
-  for (pp = description + key; p = *pp; pp = &(p->next))
+  for (pp = description + key; (p = *pp); pp = &(p->next))
     {
       if (!Wscmp (p->hinshi, hin))
         {
@@ -716,7 +712,7 @@
   for (s = hin; *s; s++)
     key += (int) *s;
   key = ((unsigned) key & HINSHIBUFINDEXMASK);
-  for (pp = description + key; p = *pp; pp = &(p->next))
+  for (pp = description + key; (p = *pp); pp = &(p->next))
     {
       if (!Wscmp (p->hinshi, hin))
         {
@@ -743,7 +739,7 @@
       (void) fprintf (stderr, "%s: can not open the table file of parts of speech \"%s\".\n", program, description_table);
       exit (1);
     }
-  while (s = Fgetws (readbuf, READBUFSIZE, f))
+  while ((s = Fgetws (readbuf, READBUFSIZE, f)))
     {
       Wchar nl[1];
 
@@ -920,7 +916,7 @@
     }
 
   key = ((unsigned) key & DICBUFINDEXMASK);
-  for (pp = dic + key; p = *pp; pp = &(p->next))
+  for (pp = dic + key; (p = *pp); pp = &(p->next))
     {
       if (!Wscmp (p->yomi, yomi) && !Wscmp (p->tango, kouho) && ((flags & IGNORE_HINSHI) || !Wscmp (p->hinshi->hinshi, hinshi)) && ((flags & IGNORE_KIND) || ((p->kind & kind) == kind)))
         {
@@ -979,7 +975,7 @@
 }
 
 /* 登録されているエントリに対して fn を実行する */
-
+#if 0
 static void
 for_all_interned (fn)
      void (*fn) ();
@@ -995,6 +991,7 @@
         }
     }
 }
+#endif
 
 static void
 storepd (file)
@@ -1005,7 +1002,7 @@
   long kindbit;
   struct dicpack *dicentry;
 
-  while (p = Fgetws (readbuf, READBUFSIZE, file))
+  while ((p = Fgetws (readbuf, READBUFSIZE, file)))
     {
       key = 0;
       yomi = extstr (p, &p, &tkey);
@@ -1043,7 +1040,7 @@
   struct dicpack *dicentry;
   long kindbit, flags = 0L;
 
-  while (p = Fgetws (readbuf, READBUFSIZE, file))
+  while ((p = Fgetws (readbuf, READBUFSIZE, file)))
     {
       key = 0;
       yomi = extstr (p, &p, &tkey);
@@ -1263,6 +1260,7 @@
     }
 }
 
+#if 0
 static void
 showdeleted (p)
      struct dicpack *p;
@@ -1273,6 +1271,7 @@
       printentry (stdout, p);
     }
 }
+#endif
 
 static void
 showentry (pd, n)
@@ -1374,15 +1373,15 @@
   p2 = (struct dicpack **)pp2;
 
   int n;
-  if (n = Wscmp ((*p1)->yomi, (*p2)->yomi))
+  if ((n = Wscmp ((*p1)->yomi, (*p2)->yomi)))
     {
       return n;
     }
-  else if (n = Wscmp ((*p1)->tango, (*p2)->tango))
+  else if ((n = Wscmp ((*p1)->tango, (*p2)->tango)))
     {
       return n;
     }
-  else if (n = Wscmp ((*p1)->hinshi->hinshi, (*p2)->hinshi->hinshi))
+  else if ((n = Wscmp ((*p1)->hinshi->hinshi, (*p2)->hinshi->hinshi)))
     {
       return n;
     }
@@ -1400,19 +1399,19 @@
   p2 = (struct dicpack **)pp2;
 
   int n;
-  if (n = Wscmp ((*p1)->yomi, (*p2)->yomi))
+  if ((n = Wscmp ((*p1)->yomi, (*p2)->yomi)))
     {
       return n;
     }
-  else if (n = ((*p2)->hindo - (*p1)->hindo))
+  else if ((n = ((*p2)->hindo - (*p1)->hindo)))
     {
       return n;
     }
-  else if (n = Wscmp ((*p1)->tango, (*p2)->tango))
+  else if ((n = Wscmp ((*p1)->tango, (*p2)->tango)))
     {
       return n;
     }
-  else if (n = Wscmp ((*p1)->hinshi->hinshi, (*p2)->hinshi->hinshi))
+  else if ((n = Wscmp ((*p1)->hinshi->hinshi, (*p2)->hinshi->hinshi)))
     {
       return n;
     }