[cpl-plugin-vimos] 44/45: Add fixes for common compiler errors

Ole Streicher olebole-guest at alioth.debian.org
Thu Nov 7 08:20:59 UTC 2013


This is an automated email from the git hooks/post-receive script.

olebole-guest pushed a commit to branch debian
in repository cpl-plugin-vimos.

commit 708d422f60aa855e7a7181cb72873d9139c04306
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Wed Nov 6 11:02:43 2013 +0100

    Add fixes for common compiler errors
---
 debian/patches/fix_compiler_errors.patch |  174 ++++++++++++++++++++++++++++++
 debian/patches/series                    |    1 +
 2 files changed, 175 insertions(+)

diff --git a/debian/patches/fix_compiler_errors.patch b/debian/patches/fix_compiler_errors.patch
new file mode 100644
index 0000000..a1440cb
--- /dev/null
+++ b/debian/patches/fix_compiler_errors.patch
@@ -0,0 +1,174 @@
+--- a/vimos/moses.c
++++ b/vimos/moses.c
+@@ -5464,7 +5464,7 @@
+         *err = sqrt(*err);
+     
+         if (ids == NULL) {
+-            cpl_msg_debug(cpl_error_get_where(), cpl_error_get_message());
++            cpl_msg_debug(cpl_error_get_where(), "%s", cpl_error_get_message());
+             cpl_msg_debug(func, "Fitting IDS");
+             cpl_error_set_where(func);
+             if (rejection) {
+@@ -18711,7 +18711,7 @@
+     if (col != 1) {
+         cpl_table_delete(standard);
+         cpl_msg_error(cpl_func, 
+-                      "Assertion failure!!! col = %d (it should be 1)", col);
++                      "Assertion failure!!! col = %"CPL_SIZE_FORMAT" (it should be 1)", col);
+         return 1;
+     }
+ 
+--- a/vimos/fors_dfs.c
++++ b/vimos/fors_dfs.c
+@@ -662,7 +662,7 @@
+     if (frame) {
+         image = cpl_image_load(cpl_frame_get_filename(frame), type, 0, ext);
+         if (image == NULL) {
+-            cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++            cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+             cpl_msg_error(func, "Cannot load image %s",
+                           cpl_frame_get_filename(frame));
+         }
+@@ -717,7 +717,7 @@
+     if (frame) {
+         table = cpl_table_load(cpl_frame_get_filename(frame), ext, 1);
+         if (table == NULL) {
+-            cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++            cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+             cpl_msg_error(func, "Cannot load table %s",
+                           cpl_frame_get_filename(frame));
+         }
+@@ -768,7 +768,7 @@
+     if (frame) {
+         plist = cpl_propertylist_load(cpl_frame_get_filename(frame), ext);
+         if (plist == NULL) {
+-            cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++            cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+             cpl_msg_error(func, "Cannot load header from %s",
+                           cpl_frame_get_filename(frame));
+         }
+@@ -824,7 +824,7 @@
+ 
+ 
+     if (category == NULL || frameset == NULL || image == NULL) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_error_set(func, CPL_ERROR_NULL_INPUT);
+         return -1;
+     }
+@@ -844,7 +844,7 @@
+     cpl_frame_set_group(frame, CPL_FRAME_GROUP_PRODUCT);
+     cpl_frame_set_level(frame, CPL_FRAME_LEVEL_FINAL);
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Cannot initialise the product frame");
+         cpl_frame_delete(frame);
+         cpl_free(filename);
+@@ -868,7 +868,7 @@
+     if (cpl_dfs_setup_product_header(plist, frame, frameset, parlist,
+                                      recipename, version, "PRO-1.15")) {
+ #endif
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Problem with product %s FITS header definition",
+                       category);
+         if (header == NULL)
+@@ -896,7 +896,7 @@
+ 
+     if (cpl_image_save(image, filename, CPL_BPP_IEEE_FLOAT, plist,
+                        CPL_IO_DEFAULT)) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Cannot save product %s to disk", filename);
+         if (header == NULL)
+             cpl_propertylist_delete(plist);
+@@ -962,7 +962,7 @@
+ 
+     if (category == NULL || frameset == NULL || table == NULL) {
+         cpl_error_set(func, CPL_ERROR_NULL_INPUT);
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         return -1;
+     }
+ 
+@@ -988,7 +988,7 @@
+     cpl_frame_set_group(frame, CPL_FRAME_GROUP_PRODUCT);
+     cpl_frame_set_level(frame, CPL_FRAME_LEVEL_FINAL);
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Cannot initialise the product frame");
+         cpl_frame_delete(frame);
+         cpl_free(filename);
+@@ -1012,7 +1012,7 @@
+     if (cpl_dfs_setup_product_header(plist, frame, frameset, parlist,
+                                      recipename, version, "PRO-1.15")) {
+ #endif
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Problem with product %s FITS header definition",
+                       category);
+         if (header == NULL)
+@@ -1038,7 +1038,7 @@
+     
+     
+     if (cpl_table_save(table, plist, NULL, filename, CPL_IO_DEFAULT)) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Cannot save product %s to disk", filename);
+         if (header == NULL)
+             cpl_propertylist_delete(plist);
+--- a/vimos/vimos_calib_impl.c
++++ b/vimos/vimos_calib_impl.c
+@@ -983,7 +983,7 @@
+     slits = mos_locate_spectra(refmask);
+ 
+     if (!slits) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         vimos_calib_exit("No slits could be detected!");
+     }
+ 
+@@ -2070,7 +2070,7 @@
+     cpl_table_delete(slits); slits = NULL;
+ 
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         vimos_calib_exit(NULL);
+     }
+ 
+--- a/vimos/vimos_science_impl.c
++++ b/vimos/vimos_science_impl.c
+@@ -1564,7 +1564,7 @@
+     cpl_propertylist_delete(header); header = NULL;
+ 
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         vimos_science_exit(NULL);
+     }
+     else 
+--- a/vimos/vimos_calib_mult.c
++++ b/vimos/vimos_calib_mult.c
+@@ -1971,7 +1971,7 @@
+         cpl_table_delete(subslits); subslits = NULL;
+ 
+         if (cpl_error_get_code()) {
+-            cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++            cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+             vimos_calmul_exit(NULL);
+         }
+     }
+--- a/recipes/vmifucombinecube.cc
++++ b/recipes/vmifucombinecube.cc
+@@ -497,7 +497,7 @@
+     if (i) {
+       if (strcmp(tplStart, astart)) {
+         if (warning) {
+-          cpl_msg_warning(task, warning);
++          cpl_msg_warning(task, "%s", warning);
+           warning = NULL;                       /* Print just once */
+         }
+       }
diff --git a/debian/patches/series b/debian/patches/series
index e2c2220..39ff0f9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 libadd_cpl.patch
 set_plugindir.patch
 use-std-paths-for-cpl.patch
+fix_compiler_errors.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cpl-plugin-vimos.git



More information about the debian-science-commits mailing list