Skip to content
Snippets Groups Projects
Commit 18c1cc99 authored by Utz-Uwe Haus's avatar Utz-Uwe Haus
Browse files

ensure clang is not confused by attribute value conversion code (assert silences warning)

parent f6904655
No related branches found
No related tags found
No related merge requests found
...@@ -730,10 +730,12 @@ mstro_attribute_val__compute_size(enum mstro_stp_val_kind kind, ...@@ -730,10 +730,12 @@ mstro_attribute_val__compute_size(enum mstro_stp_val_kind kind,
*val_size = sizeof(double); break; *val_size = sizeof(double); break;
case MSTRO_STP_STR: case MSTRO_STP_STR:
case MSTRO_STP_REGEX: case MSTRO_STP_REGEX:
if(string) if(string!=NULL)
*val_size = strlen(string)+1; *val_size = strlen(string)+1;
else else {
assert(val!=NULL);
*val_size = strlen((char*)val)+1; *val_size = strlen((char*)val)+1;
}
break; break;
case MSTRO_STP_TIMESTAMP: case MSTRO_STP_TIMESTAMP:
*val_size = sizeof(mstro_timestamp); *val_size = sizeof(mstro_timestamp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment