diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2005-06-13 20:06:47 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2005-06-13 20:06:47 (GMT) |
commit | 9acff105847ea3cba56045ec1f8ab992b2e7f57e (patch) | |
tree | 2008b7c7a761c6ecc0fa0d5f3f70e5f8b5b633c0 /tools/lib/h5diff_util.c | |
parent | cf83fb06120a4a90963fe0c9e2037af03965c5fc (diff) | |
download | hdf5-9acff105847ea3cba56045ec1f8ab992b2e7f57e.zip hdf5-9acff105847ea3cba56045ec1f8ab992b2e7f57e.tar.gz hdf5-9acff105847ea3cba56045ec1f8ab992b2e7f57e.tar.bz2 |
[svn-r10915] Purpose: work around a compiler bug
Description:
while compiling in mir with pgcc -O2 a condition
if (name ) {
do_something(name);
}
is executed when name is NULL
Solution:
avoid the error by checking the NULL pointer inside do_something(name);
Platforms tested:
linux (mir with pgcc 6.0)
Misc. update:
Diffstat (limited to 'tools/lib/h5diff_util.c')
-rw-r--r-- | tools/lib/h5diff_util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 4f1e97c..34686c6 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -283,6 +283,9 @@ diff_basename(const char *name) { size_t i; + if (name==NULL) + return; + /* Find the end of the base name */ i = strlen(name); while (i>0 && '/'==name[i-1]) |