mount-matrix: Fix deprecation warning
src/accel-mount-matrix.c: In function ‘parse_mount_matrix’: src/accel-mount-matrix.c:121:17: warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead [-Wdeprecated-declarations] 121 | *vecs = g_memdup (id_matrix, sizeof(id_matrix)); | ^
This commit is contained in:
@@ -99,7 +99,11 @@ parse_mount_matrix (const char *mtx,
|
|||||||
|
|
||||||
/* Empty string means we use the identity matrix */
|
/* Empty string means we use the identity matrix */
|
||||||
if (mtx == NULL || *mtx == '\0') {
|
if (mtx == NULL || *mtx == '\0') {
|
||||||
|
#if GLIB_CHECK_VERSION(2, 68, 0)
|
||||||
|
*vecs = g_memdup2 (id_matrix, sizeof(id_matrix));
|
||||||
|
#else
|
||||||
*vecs = g_memdup (id_matrix, sizeof(id_matrix));
|
*vecs = g_memdup (id_matrix, sizeof(id_matrix));
|
||||||
|
#endif
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user