/[packages]/updates/1/hdf5/current/SOURCES/hdf5-1.8.5-fix-str-fmt.patch
ViewVC logotype

Contents of /updates/1/hdf5/current/SOURCES/hdf5-1.8.5-fix-str-fmt.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 101464 - (show annotations) (download)
Wed Jun 1 19:01:05 2011 UTC (12 years, 9 months ago) by schedbot
File size: 13976 byte(s)
SILENT: branch release 1
1 --- tools/h5import/h5import.c.orig 2010-06-04 16:24:21.000000000 +0200
2 +++ tools/h5import/h5import.c 2010-08-13 14:50:05.000000000 +0200
3 @@ -64,7 +64,7 @@
4
5 if (argc < 2)
6 {
7 - (void) fprintf(stderr, err1, argc);
8 + (void) fprintf(stderr, "%s", err1, argc);
9 usage(argv[0]);
10 goto err;
11 }
12 @@ -98,7 +98,7 @@
13 opt.fcount++;
14 }
15 else {
16 - (void) fprintf(stderr, err9, argv[i]);
17 + (void) fprintf(stderr, "%s", err9, argv[i]);
18 goto err;
19 }
20
21 @@ -131,7 +131,7 @@
22 case 8: /* read dimensions */
23 if (parseDimensions(in, argv[i]) == -1)
24 {
25 - (void) fprintf(stderr, err6, argv[i]);
26 + (void) fprintf(stderr, "%s", err6, argv[i]);
27 goto err;
28 }
29 break;
30 @@ -142,7 +142,7 @@
31 case 10: /* read path name */
32 if (parsePathInfo(&in->path, argv[i]) == -1)
33 {
34 - (void) fprintf(stderr, err5, argv[i]);
35 + (void) fprintf(stderr, "%s", err5, argv[i]);
36 goto err;
37 }
38 break;
39 @@ -153,7 +153,7 @@
40 case 12: /* read data type */
41 if (getInputClass(in, argv[i]) == -1)
42 {
43 - (void) fprintf(stderr, err7, argv[i]);
44 + (void) fprintf(stderr, "%s", err7, argv[i]);
45 goto err;
46 }
47
48 @@ -171,7 +171,7 @@
49 case 14: /* read data size */
50 if (getInputSize(in, (int)HDstrtol(argv[i], NULL, BASE_10)) == -1)
51 {
52 - (void) fprintf(stderr, err8, argv[i]);
53 + (void) fprintf(stderr, "%s", err8, argv[i]);
54 goto err;
55 }
56 /*set default value for output-size */
57 @@ -256,7 +256,7 @@
58 }
59
60 if (token == ERR)
61 - (void) fprintf(stderr, err1, s);
62 + (void) fprintf(stderr, "%s", err1, s);
63 }
64 else /* filename */
65 {
66 @@ -313,14 +313,14 @@
67
68 if ((*strm = fopen(infile, "rb")) == NULL)
69 {
70 - (void) fprintf(stderr, err1, infile);
71 + (void) fprintf(stderr, "%s", err1, infile);
72 return(-1);
73 }
74 #else
75
76 if ((*strm = fopen(infile, "r")) == NULL)
77 {
78 - (void) fprintf(stderr, err1, infile);
79 + (void) fprintf(stderr, "%s", err1, infile);
80 return(-1);
81 }
82
83 @@ -335,7 +335,7 @@
84 {
85 if ((*strm = fopen(infile, "r")) == NULL)
86 {
87 - (void) fprintf(stderr, err1, infile);
88 + (void) fprintf(stderr, "%s", err1, infile);
89 return(-1);
90 }
91 }
92 @@ -348,13 +348,13 @@
93 case 4: /* IN */
94 if (allocateIntegerStorage(in) == -1)
95 {
96 - (void) fprintf(stderr, err2, infile);
97 + (void) fprintf(stderr, "%s", err2, infile);
98 return(-1);
99 }
100
101 if (readIntegerData(strm, in) == -1)
102 {
103 - (void) fprintf(stderr, err4, infile);
104 + (void) fprintf(stderr, "%s", err4, infile);
105 return(-1);
106 }
107 break;
108 @@ -364,14 +364,14 @@
109 case 3: /* FP */
110 if (allocateFloatStorage(in) == -1)
111 {
112 - (void) fprintf(stderr, err3, infile);
113 + (void) fprintf(stderr, "%s", err3, infile);
114 return(-1);
115
116 }
117
118 if (readFloatData(strm, in) == -1)
119 {
120 - (void) fprintf(stderr, err5, infile);
121 + (void) fprintf(stderr, "%s", err5, infile);
122 return(-1);
123 }
124 break;
125 @@ -380,7 +380,7 @@
126
127 if (processStrData(strm, in, file_id) == -1)
128 {
129 - (void) fprintf(stderr, err11, infile);
130 + (void) fprintf(stderr, "%s", err11, infile);
131 return(-1);
132 }
133
134 @@ -392,12 +392,12 @@
135 case 7: /* UIN */
136 if (allocateUIntegerStorage(in) == -1)
137 {
138 - (void) fprintf(stderr, err6, infile);
139 + (void) fprintf(stderr, "%s", err6, infile);
140 return(-1);
141 }
142 if (readUIntegerData(strm, in) == -1)
143 {
144 - (void) fprintf(stderr, err7, infile);
145 + (void) fprintf(stderr, "%s", err7, infile);
146 return(-1);
147 }
148 break;
149 @@ -1201,7 +1201,7 @@
150
151 if ((*strm = fopen(infile, "r")) == NULL)
152 {
153 - (void) fprintf(stderr, err1, infile);
154 + (void) fprintf(stderr, "%s", err1, infile);
155 return (-1);
156 }
157
158 @@ -1209,7 +1209,7 @@
159 {
160 if ((kindex = mapKeywordToIndex(key)) == -1)
161 {
162 - (void) fprintf(stderr, err2, infile);
163 + (void) fprintf(stderr, "%s", err2, infile);
164 return (-1);
165 }
166 switch (kindex)
167 @@ -1217,7 +1217,7 @@
168 case 0: /* PATH */
169 if (in->configOptionVector[PATH] == 1)
170 {
171 - (void) fprintf(stderr, err3a, infile);
172 + (void) fprintf(stderr, "%s", err3a, infile);
173 return (-1);
174 }
175 if (fscanf(*strm, "%s", temp) != 1)
176 @@ -1227,7 +1227,7 @@
177 }
178 if (parsePathInfo(&in->path, temp) == -1)
179 {
180 - (void) fprintf(stderr, err3b, infile);
181 + (void) fprintf(stderr, "%s", err3b, infile);
182 return (-1);
183 }
184 in->configOptionVector[PATH] = 1;
185 @@ -1236,7 +1236,7 @@
186 case 1: /* INPUT-CLASS */
187 if (in->configOptionVector[INPUT_CLASS] == 1)
188 {
189 - (void) fprintf(stderr, err4a, infile);
190 + (void) fprintf(stderr, "%s", err4a, infile);
191 return (-1);
192 }
193
194 @@ -1247,7 +1247,7 @@
195 }
196 if (getInputClass(in, temp) == -1)
197 {
198 - (void) fprintf(stderr, err4b, infile);
199 + (void) fprintf(stderr, "%s", err4b, infile);
200 return (-1);
201 }
202
203 @@ -1268,7 +1268,7 @@
204 case 2: /* INPUT-SIZE */
205 if (in->configOptionVector[INPUT_SIZE] == 1)
206 {
207 - (void) fprintf(stderr, err5a, infile);
208 + (void) fprintf(stderr, "%s", err5a, infile);
209 return (-1);
210 }
211 if (fscanf(*strm, "%d", (&ival)) != 1)
212 @@ -1278,7 +1278,7 @@
213 }
214 if (getInputSize(in, ival) == -1)
215 {
216 - (void) fprintf(stderr, err5b, infile);
217 + (void) fprintf(stderr, "%s", err5b, infile);
218 return (-1);
219 }
220 in->configOptionVector[INPUT_SIZE] = 1;
221 @@ -1291,13 +1291,13 @@
222 case 3: /* RANK */
223 if (in->configOptionVector[RANK] == 1)
224 {
225 - (void) fprintf(stderr, err6a, infile);
226 + (void) fprintf(stderr, "%s", err6a, infile);
227 return (-1);
228 }
229
230 if (getRank(in, strm) == -1)
231 {
232 - (void) fprintf(stderr, err6b, infile);
233 + (void) fprintf(stderr, "%s", err6b, infile);
234 return (-1);
235 }
236 in->configOptionVector[RANK] = 1;
237 @@ -1306,18 +1306,18 @@
238 case 4: /* DIMENSION-SIZES */
239 if (in->configOptionVector[DIM] == 1)
240 {
241 - (void) fprintf(stderr, err7a, infile);
242 + (void) fprintf(stderr, "%s", err7a, infile);
243 return (-1);
244 }
245
246 if (in->configOptionVector[RANK] == 0)
247 {
248 - (void) fprintf(stderr, err7b, infile);
249 + (void) fprintf(stderr, "%s", err7b, infile);
250 return (-1);
251 }
252 if (getDimensionSizes(in, strm) == -1)
253 {
254 - (void) fprintf(stderr, err7c, infile);
255 + (void) fprintf(stderr, "%s", err7c, infile);
256 return (-1);
257 }
258 in->configOptionVector[DIM] = 1;
259 @@ -1326,13 +1326,13 @@
260 case 5: /* OUTPUT-CLASS */
261 if (in->configOptionVector[OUTPUT_CLASS] == 1)
262 {
263 - (void) fprintf(stderr, err8a, infile);
264 + (void) fprintf(stderr, "%s", err8a, infile);
265 return (-1);
266 }
267
268 if (getOutputClass(in, strm) == -1)
269 {
270 - (void) fprintf(stderr, err8b, infile);
271 + (void) fprintf(stderr, "%s", err8b, infile);
272 return (-1);
273 }
274 in->configOptionVector[OUTPUT_CLASS] = 1;
275 @@ -1341,13 +1341,13 @@
276 case 6: /* OUTPUT-SIZE */
277 if (in->configOptionVector[OUTPUT_SIZE] == 1)
278 {
279 - (void) fprintf(stderr, err9a, infile);
280 + (void) fprintf(stderr, "%s", err9a, infile);
281 return (-1);
282 }
283
284 if (getOutputSize(in, strm) == -1)
285 {
286 - (void) fprintf(stderr, err9b, infile);
287 + (void) fprintf(stderr, "%s", err9b, infile);
288 return (-1);
289 }
290 in->configOptionVector[OUTPUT_SIZE] = 1;
291 @@ -1356,13 +1356,13 @@
292 case 7: /* OUTPUT-ARCHITECTURE */
293 if (in->configOptionVector[OUTPUT_ARCH] == 1)
294 {
295 - (void) fprintf(stderr, err10a, infile);
296 + (void) fprintf(stderr, "%s", err10a, infile);
297 return (-1);
298 }
299
300 if (getOutputArchitecture(in, strm) == -1)
301 {
302 - (void) fprintf(stderr, err10b, infile);
303 + (void) fprintf(stderr, "%s", err10b, infile);
304 return (-1);
305 }
306 in->configOptionVector[OUTPUT_ARCH] = 1;
307 @@ -1371,13 +1371,13 @@
308 case 8: /* OUTPUT-BYTE-ORDER */
309 if (in->configOptionVector[OUTPUT_B_ORDER] == 1)
310 {
311 - (void) fprintf(stderr, err11a, infile);
312 + (void) fprintf(stderr, "%s", err11a, infile);
313 return (-1);
314 }
315
316 if (getOutputByteOrder(in, strm) == -1)
317 {
318 - (void) fprintf(stderr, err11b, infile);
319 + (void) fprintf(stderr, "%s", err11b, infile);
320 return (-1);
321 }
322 in->configOptionVector[OUTPUT_B_ORDER] = 1;
323 @@ -1386,19 +1386,19 @@
324 case 9: /* CHUNKED-DIMENSION-SIZES */
325 if (in->configOptionVector[CHUNK] == 1)
326 {
327 - (void) fprintf(stderr, err12a, infile);
328 + (void) fprintf(stderr, "%s", err12a, infile);
329 return (-1);
330 }
331 /* cant appear before dimension sizes have been provided */
332 if (in->configOptionVector[DIM] == 0)
333 {
334 - (void) fprintf(stderr, err12b, infile);
335 + (void) fprintf(stderr, "%s", err12b, infile);
336 return (-1);
337 }
338
339 if (getChunkedDimensionSizes(in, strm) == -1)
340 {
341 - (void) fprintf(stderr, err12c, infile);
342 + (void) fprintf(stderr, "%s", err12c, infile);
343 return (-1);
344 }
345 in->configOptionVector[CHUNK] = 1;
346 @@ -1407,13 +1407,13 @@
347 case 10: /* COMPRESSION-TYPE */
348 if (in->configOptionVector[COMPRESS] == 1)
349 {
350 - (void) fprintf(stderr, err13a, infile);
351 + (void) fprintf(stderr, "%s", err13a, infile);
352 return (-1);
353 }
354
355 if (getCompressionType(in, strm) == -1)
356 {
357 - (void) fprintf(stderr, err13b, infile);
358 + (void) fprintf(stderr, "%s", err13b, infile);
359 return (-1);
360 }
361 in->configOptionVector[COMPRESS] = 1;
362 @@ -1428,13 +1428,13 @@
363 case 11: /* COMPRESSION-PARAM */
364 if (in->configOptionVector[COMPRESS_PARAM] == 1)
365 {
366 - (void) fprintf(stderr, err14a, infile);
367 + (void) fprintf(stderr, "%s", err14a, infile);
368 return (-1);
369 }
370
371 if (getCompressionParameter(in, strm) == -1)
372 {
373 - (void) fprintf(stderr, err14b, infile);
374 + (void) fprintf(stderr, "%s", err14b, infile);
375 return (-1);
376 }
377
378 @@ -1449,13 +1449,13 @@
379 case 12: /* EXTERNAL-STORAGE */
380 if (in->configOptionVector[EXTERNAL] == 1)
381 {
382 - (void) fprintf(stderr, err15a, infile);
383 + (void) fprintf(stderr, "%s", err15a, infile);
384 return (-1);
385 }
386
387 if (getExternalFilename(in, strm) == -1)
388 {
389 - (void) fprintf(stderr, err15b, infile);
390 + (void) fprintf(stderr, "%s", err15b, infile);
391 return (-1);
392 }
393 in->configOptionVector[EXTERNAL] = 1;
394 @@ -1464,18 +1464,18 @@
395 case 13: /* MAXIMUM-DIMENSIONS */
396 if (in->configOptionVector[EXTEND] == 1)
397 {
398 - (void) fprintf(stderr, err16a, infile);
399 + (void) fprintf(stderr, "%s", err16a, infile);
400 return (-1);
401 }
402 /* cant appear before dimension sizes have been provided */
403 if (in->configOptionVector[DIM] == 0)
404 {
405 - (void) fprintf(stderr, err16b, infile);
406 + (void) fprintf(stderr, "%s", err16b, infile);
407 return (-1);
408 }
409 if (getMaximumDimensionSizes(in, strm) == -1)
410 {
411 - (void) fprintf(stderr, err16c, infile);
412 + (void) fprintf(stderr, "%s", err16c, infile);
413 return (-1);
414 }
415 in->configOptionVector[EXTEND] = 1;
416 @@ -1492,7 +1492,7 @@
417
418 if (validateConfigurationParameters(in) == -1)
419 {
420 - (void) fprintf(stderr, err17, infile);
421 + (void) fprintf(stderr, "%s", err17, infile);
422 return (-1);
423 }
424
425 @@ -1600,7 +1600,7 @@
426 token = HDstrtok (temp, delimiter);
427 if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH)
428 {
429 - (void) fprintf(stderr, err1);
430 + (void) fprintf(stderr, "%s", err1);
431 return (-1);
432 }
433 HDstrcpy(path->group[i++],token);
434 @@ -1613,7 +1613,7 @@
435 break;
436 if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH)
437 {
438 - (void) fprintf(stderr, err1);
439 + (void) fprintf(stderr, "%s", err1);
440 return (-1);
441 }
442 HDstrcpy(path->group[i++],token);
443 @@ -2497,7 +2497,7 @@
444 if ((file_id = H5Fopen(opt->outfile, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
445 if ((file_id = H5Fcreate(opt->outfile, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) == FAIL)
446 {
447 - (void) fprintf(stderr, err1, opt->outfile);
448 + (void) fprintf(stderr, "%s", err1, opt->outfile);
449 return (-1);
450 }
451 }
452 @@ -2510,14 +2510,14 @@
453 {
454 if (processConfigurationFile(opt->infiles[k].configfile, in, &strm) == -1)
455 {
456 - (void) fprintf(stderr, err2, opt->infiles[k].configfile);
457 + (void) fprintf(stderr, "%s", err2, opt->infiles[k].configfile);
458 return (-1);
459 }
460 }
461
462 if (processDataFile(opt->infiles[k].datafile, in, &strm, file_id ) == -1)
463 {
464 - (void) fprintf(stderr, err3, opt->infiles[k].datafile);
465 + (void) fprintf(stderr, "%s", err3, opt->infiles[k].datafile);
466 return (-1);
467 }
468

  ViewVC Help
Powered by ViewVC 1.1.30