mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
st/oxr: Silence warning from snprintf when compiling with optimisations
This commit is contained in:
parent
d6465bc017
commit
e8ead02c4c
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue