Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

[netcdfgroup] NetCDF 4.1.1 did not compile dumplib.c because of the format missing in a snprintf

Hello,

When compiling with gcc 4.4.1 (from a mandriva 2010 distribution)
there is an error on a call to snprintf (the format is missing).
Here is the patch which corrects this:

--- ncdump/dumplib.c.orig    2010-04-26 18:12:49.000000000 +0200
+++ ncdump/dumplib.c    2010-04-26 18:18:29.000000000 +0200
@@ -1005,7 +1005,7 @@
     char *prefix = "0X";
     int prelen = strlen(prefix);
 
-    snprintf(sp, prelen + 1, prefix);
+    snprintf(sp, prelen + 1, "%s", prefix);
     sp += prelen;
     for(i = 0; i < size; i++) {
     int res;

Ph.P.
CLS - Space oceanography division.


  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: