"""
-for b in ['missing', 'null', 'malloc', 'bufferSize']:
+for b in ['missing', 'null', 'malloc', 'bufferSize']:
patterns = {}
patterns = {'b': b}
patterns['origin'] = "MPI-CorrBench"
patterns['generatedby'] = f'DO NOT EDIT: this file was generated by {os.path.basename(sys.argv[0])}. DO NOT EDIT.'
patterns['rmafeature'] = 'Yes'
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Invalid buffer in window creation.'
replace['longdesc'] = 'Invalid buffer in window creation.'
replace['outcome'] = 'ERROR: InvalidBuffer'
replace['bufferalloc'] = 'buffer = NULL; /* MBIERROR1 */'
replace['longdesc'] = 'Use NULL buffer in window creation.'
elif b == 'bufferSize':
- replace['bufferalloc'] = 'buffer = malloc((N/2) * sizeof(int)); /* MBIERROR1 */'
+ replace['bufferalloc'] = 'buffer = (int *)malloc((N/2) * sizeof(int)); /* MBIERROR1 */'
replace['bufferfree'] = 'free(buffer);'
replace['longdesc'] = 'Unmatched size of buffer in window creation.'
else:
- replace['bufferalloc'] = 'buffer = malloc(N * sizeof(int));'
+ replace['bufferalloc'] = 'buffer = (int *)malloc(N * sizeof(int));'
replace['bufferfree'] = 'free(buffer);'
replace['longdesc'] = 'Correct initialized buffer in window creation.'
replace['outcome'] = 'OK'