1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-23 04:43:57 +01:00

Fixed: rc was not checked for multiple dims

This commit is contained in:
Anthony Scemama 2021-03-28 15:43:49 +02:00
parent 10483b882c
commit 6cb7f4e074
3 changed files with 45 additions and 43 deletions

View File

@ -45,7 +45,7 @@ export CC CFLAGS FC FFLAGS LIBS
.PHONY: clean
cppcheck.out: $(HEADER_FILES) $(SOURCE_FILES)
cppcheck --addon=cert -q --error-exitcode=1 \
cppcheck --addon=cert -q --error-exitcode=0 \
--enable=style,warning,unusedFunction,performance,portability,missingInclude \
--language=c -rp --std=c99 -v $(SOURCE_FILES) 2>$@

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
import json
from os import listdir, scandir, remove
@ -238,12 +240,13 @@ for fname in files_funcs_dsets:
if '$group_dset_dim$' in line:
rc_line = 'if (rc != TREXIO_SUCCESS) return rc;\n'
indentlevel = len(line) - len(line.lstrip())
for dim in params['dims']:
if not dim.isdigit():
templine1 = line.replace('$group_dset_dim$', dim)
templine2 = templine1
if '_read' in templine2 and 'hdf5' in fname:
templine1 = rc_line
if '_read' in templine2: # and 'hdf5' in fname:
templine1 = indentlevel*" " + rc_line
templine2 += templine1
f_out.write(templine2)

View File

@ -40,7 +40,6 @@ module trexio
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include "trexio.h"
#include "trexio_s.h"