pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/src data/ChangeLog data/procedure.h math/C...


From: Ben Pfaff
Subject: [Pspp-cvs] pspp/src data/ChangeLog data/procedure.h math/C...
Date: Wed, 10 May 2006 04:11:07 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Branch:         
Changes by:     Ben Pfaff <address@hidden>      06/05/10 04:11:07

Modified files:
        src/data       : ChangeLog procedure.h 
        src/math       : ChangeLog sort.c 

Log message:
        Add WARN_UNUSED_RESULT to procedure function prototypes
        and fix up one user who needed it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/data/ChangeLog.diff?tr1=1.48&tr2=1.49&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/data/procedure.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/math/ChangeLog.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/math/sort.c.diff?tr1=1.9&tr2=1.10&r1=text&r2=text

Patches:
Index: pspp/src/data/ChangeLog
diff -u pspp/src/data/ChangeLog:1.48 pspp/src/data/ChangeLog:1.49
--- pspp/src/data/ChangeLog:1.48        Wed May 10 04:08:47 2006
+++ pspp/src/data/ChangeLog     Wed May 10 04:11:07 2006
@@ -1,3 +1,8 @@
+Tue May  9 21:09:17 2006  Ben Pfaff  <address@hidden>
+
+       * procedure.h: Add WARN_UNUSED_RESULT to procedure function
+       prototypes.
+
 Tue May  9 21:08:05 2006  Ben Pfaff  <address@hidden>
 
        * casefile.c: Convert many uses of `int' to `bool'.
Index: pspp/src/data/procedure.h
diff -u pspp/src/data/procedure.h:1.3 pspp/src/data/procedure.h:1.4
--- pspp/src/data/procedure.h:1.3       Sat May  6 18:01:13 2006
+++ pspp/src/data/procedure.h   Wed May 10 04:11:07 2006
@@ -22,7 +22,9 @@
 
 #include <time.h>
 #include <stdbool.h>
+
 #include <data/transformations.h>
+#include <libpspp/compiler.h>
 
 struct ccase;
 struct casefile;
@@ -63,17 +65,21 @@
 struct casefile *proc_capture_output (void);
 
 bool procedure (bool (*proc_func) (const struct ccase *, void *),
-                void *aux);
+                void *aux)
+     WARN_UNUSED_RESULT;
 bool procedure_with_splits (void (*begin_func) (const struct ccase *, void *),
                             bool (*proc_func) (const struct ccase *, void *),
                             void (*end_func) (void *),
-                            void *aux);
+                            void *aux)
+     WARN_UNUSED_RESULT;
 bool multipass_procedure (bool (*proc_func) (const struct casefile *, void *),
-                          void *aux);
+                          void *aux)
+     WARN_UNUSED_RESULT;
 bool multipass_procedure_with_splits (bool (*) (const struct ccase *,
                                                 const struct casefile *,
                                                 void *),
-                                      void *aux);
+                                      void *aux)
+     WARN_UNUSED_RESULT;
 time_t time_of_last_procedure (void);
 
 /* Number of cases to lag. */
Index: pspp/src/math/ChangeLog
diff -u pspp/src/math/ChangeLog:1.4 pspp/src/math/ChangeLog:1.5
--- pspp/src/math/ChangeLog:1.4 Thu May  4 06:19:02 2006
+++ pspp/src/math/ChangeLog     Wed May 10 04:11:07 2006
@@ -1,3 +1,8 @@
+Tue May  9 21:09:37 2006  Ben Pfaff  <address@hidden>
+
+       * sort.c (sort_active_file_to_casefile): Check return value of
+       multipass_procedure().
+
 Wed May  3 23:06:43 2006  Ben Pfaff  <address@hidden>
 
        Continue reforming procedure execution.  In this phase, get rid of
Index: pspp/src/math/sort.c
diff -u pspp/src/math/sort.c:1.9 pspp/src/math/sort.c:1.10
--- pspp/src/math/sort.c:1.9    Sat May  6 20:27:23 2006
+++ pspp/src/math/sort.c        Wed May 10 04:11:07 2006
@@ -112,8 +112,11 @@
 
   cb_data.criteria = criteria;
   cb_data.output = NULL;
-  multipass_procedure (sort_to_casefile_callback, &cb_data);
-
+  if (!multipass_procedure (sort_to_casefile_callback, &cb_data)) 
+    {
+      casefile_destroy (cb_data.output);
+      return NULL;
+    }
   return cb_data.output;
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]