[svn-r24270] checkin coverity changes from 10/4/2013.

tested with h5committest
This commit is contained in:
Mohamad Chaarawi 2013-10-09 11:55:33 -05:00
parent 53827d4017
commit 9d954e1136
4 changed files with 12 additions and 5 deletions

View File

@ -14,9 +14,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This file was generated by Lex with the command "lex -PH5LTyy -oH5LTanalyze.c H5LTanalyze.l".
* Do NOT modify it by hand, but in line 52, "#ifdef H5_HAVE_UNISTD_H" should be added if
* the platform doesn't have the unistd.h header file.
* This file was generated by Lex with the command "lex -PH5LTyy
* -oH5LTanalyze.c H5LTanalyze.l". Do NOT modify it by hand, but in
* line 52, "#ifdef H5_HAVE_UNISTD_H" should be added if the platform
* doesn't have the unistd.h header file. Also hdf5.h should be added
* before adding H5_HAVE_UNISTD_H.
*/
#define yy_create_buffer H5LTyy_create_buffer
@ -49,6 +51,7 @@
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
#include <hdf5.h>
#ifdef H5_HAVE_UNISTD_H
#include <unistd.h>
#endif

View File

@ -277,12 +277,15 @@
#ifdef __cplusplus
# define __attribute__(X) /*void*/
# define UNUSED /*void*/
# define NORETURN /*void*/
#else /* __cplusplus */
#ifdef H5_HAVE_ATTRIBUTE
# define UNUSED __attribute__((unused))
# define NORETURN __attribute__((noreturn))
#else
# define __attribute__(X) /*void*/
# define UNUSED /*void*/
# define NORETURN /*void*/
#endif
#endif /* __cplusplus */

View File

@ -4874,7 +4874,7 @@ static void test_data_nocomparables (const char * fname, int make_diffs)
int data1[DIM_ARRY] = {0,0,0};
int data2[DIM_ARRY] = {1,1,1};
int data3[DIM_ARRY+1] = {1,1,1,1};
int data1_dim2[DIM_ARRY][1] = {0,0,0};
int data1_dim2[DIM_ARRY][1] = {{0},{0},{0}};
int rank_attr;
char data1_str[DIM_ARRY][STR_SIZE]= {"ab","cd","ef"};
herr_t status = SUCCEED;

View File

@ -21,6 +21,8 @@
#define PROGRAMNAME "h5repack"
static int parse_command_line(int argc, const char **argv, pack_opt_t* options);
static void leave(int ret) NORETURN;
/* module-scoped variables */
static int has_i_o = 0;
@ -563,7 +565,6 @@ done:
int main(int argc, const char **argv) {
pack_opt_t options; /*the global options */
int ret = -1;
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);