mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-18 17:40:55 +08:00
[svn-r17058] added some "dummy" declarations for d_status
this error home/hdftest/snapshots-hdf5/current/tools/lib/h5tools_ref.c:126: undefined reference to `d_status' happens because the original developer of h5tools_ref.c declared these 2 variables in that source file extern char *progname; extern int d_status; this means that all programs that use this source file (typically all tools) will have to define these 2 variables, even if they are *not* used. examples const char *progname = "h5jam"; int d_status = EXIT_SUCCESS; "progname" is usually used to print the program name in the usage, and "d_status" is just a return value of the tool, usually. I was wondering about removing these 2 declarations from h5tools_ref.c extern char *progname; extern int d_status; and define those variables on each tool if they are only needed (it seems to me that only h5ls and h5dump actually "need" them) tested: smirom parallel
This commit is contained in:
parent
5e8d84b421
commit
41b80569d7
@ -97,6 +97,9 @@ static int write_dset(hid_t loc_id,int rank,hsize_t *dims,const char *name,hid_t
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* module-scoped variables */
|
||||
int d_status = EXIT_SUCCESS;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
test_basic(FILE1, FILE2, FILE11);
|
||||
|
@ -52,6 +52,8 @@ static void ph5diff_worker(int );
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* module-scoped variables */
|
||||
int d_status = EXIT_SUCCESS;
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user