[Cbe-oss-dev] [PATCH] libspe2: add parenthesis in if-stmt to remove warning messages

Brian Watt bwatt at austin.rr.com
Thu May 31 14:02:33 EST 2007


The following minor patch adds in parenthesis to three similar if
statements to remove compiler warning messages (this assumes
that all warnings should be eliminated so as to clearly highlight
all compiler messages that are the result of the LIBSPE2 build).

Signed-off-by: Brian Watt <bwatt at austin.rr.com>

===================================================================
Index: libspe2/libspe12/spethreads.c
===================================================================
--- libspe2/libspe12/spethreads.c    (revision 45)
+++ libspe2/libspe12/spethreads.c    (working copy)
@@ -403,7 +403,7 @@
         perror("dirlist");
         return MAX_THREADS_PER_GROUP;
     }
-    while(dptr=readdir(dirp))
+    while((dptr=readdir(dirp)))
     {
         ret++;
     }
===================================================================
Index: libspe2/spebase/info.c
===================================================================
--- libspe2/spebase/info.c    (revision 45)
+++ libspe2/spebase/info.c    (working copy)
@@ -49,7 +49,7 @@
         errno = EINVAL;
         return -1;
     }
-    while(dptr=readdir(dirp)) {
+    while((dptr=readdir(dirp))) {
         ret++;
     }
     closedir(dirp);
@@ -92,7 +92,7 @@
         errno = EINVAL;
         return -1;
     }
-    while(dptr=readdir(dirp)) {
+    while((dptr=readdir(dirp))) {
         ret++;
     }
     closedir(dirp);




More information about the cbe-oss-dev mailing list