st/oxr: Silence warning from snprintf when compiling with optimisations

This commit is contained in:
Jakob Bornecrantz 2019-09-06 15:45:48 +01:00
parent d6465bc017
commit e8ead02c4c

View file

@ -179,11 +179,9 @@ oxr_system_get_properties(struct oxr_logger *log,
properties->vendorId = 42;
properties->systemId = sys->systemId;
// Needed to silence the warnings.
const char *name = sys->head->str;
snprintf(properties->systemName, XR_MAX_SYSTEM_NAME_SIZE, "Monado: %s",
name);
// The magical 247 number, is to silence warnings.
snprintf(properties->systemName, XR_MAX_SYSTEM_NAME_SIZE,
"Monado: %.*s", 247, sys->head->str);
/*!
* @todo conforming implementations must support at