tests: don't use g_value_set_static_string() for non-static strings
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 13 Aug 2024 09:30:25 +0000 (11:30 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 16 Aug 2024 07:56:16 +0000 (09:56 +0200)
commit47e14b2cefb5a6d4ae6d7bffd76fa7bd129cd23b
tree81c0aad88d448b8112bc81fa70721e5b6d362d0d
parenta5ab76da1e0a7475c42336829c611f438bffd584
tests: don't use g_value_set_static_string() for non-static strings

As pointed out by Philip Withnall, g_value_set_static_string() must only
be used with actual static strings and not with ones whose life-time is
tied to that of their owner. Use g_value_set_string() to get the gpiosim
properties and rework the existing getter functions returning const
gchar * to return the address provided by libgpiosim directly instead of
passing through the GObject property path.

Suggested-by: Philip Withnall <philip@tecnocode.co.uk>
Link: https://lore.kernel.org/r/20240813093025.94980-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
tests/gpiosim-glib/gpiosim-glib.c