[gcr/wip/nielsdg/fix-warnings: 3/3] gcr: Use g_strdup() instead of strdup()
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr/wip/nielsdg/fix-warnings: 3/3] gcr: Use g_strdup() instead of strdup()
- Date: Sat, 11 Jan 2020 10:07:36 +0000 (UTC)
commit a4366800c1e7360ea62d7ddbc6c2966623bca7bb
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sat Jan 11 11:06:31 2020 +0100
gcr: Use g_strdup() instead of strdup()
This fixes some warnings about implicit declaration.
gcr/test-system-prompt.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gcr/test-system-prompt.c b/gcr/test-system-prompt.c
index 32ac493..7b3b2e7 100644
--- a/gcr/test-system-prompt.c
+++ b/gcr/test-system-prompt.c
@@ -472,14 +472,14 @@ test_prompt_properties_reset (Test *test,
gcr_prompt_reset (prompt);
- g_assert_cmpstr_free (gcr_prompt_get_title (prompt), ==, strdup (""));
+ g_assert_cmpstr_free (gcr_prompt_get_title (prompt), ==, g_strdup (""));
g_assert_cmpstr_free (gcr_prompt_get_choice_label (prompt), ==, NULL);
- g_assert_cmpstr_free (gcr_prompt_get_description (prompt), ==, strdup (""));
- g_assert_cmpstr_free (gcr_prompt_get_message (prompt), ==, strdup (""));
+ g_assert_cmpstr_free (gcr_prompt_get_description (prompt), ==, g_strdup (""));
+ g_assert_cmpstr_free (gcr_prompt_get_message (prompt), ==, g_strdup (""));
g_assert_cmpstr_free (gcr_prompt_get_caller_window (prompt), ==, NULL);
g_assert_cmpstr_free (gcr_prompt_get_warning (prompt), ==, NULL);
- g_assert_cmpstr_free (gcr_prompt_get_continue_label (prompt), ==, strdup ("Continue"));
- g_assert_cmpstr_free (gcr_prompt_get_cancel_label (prompt), ==, strdup ("Cancel"));
+ g_assert_cmpstr_free (gcr_prompt_get_continue_label (prompt), ==, g_strdup ("Continue"));
+ g_assert_cmpstr_free (gcr_prompt_get_cancel_label (prompt), ==, g_strdup ("Cancel"));
g_assert (gcr_prompt_get_password_new (prompt) == FALSE);
g_assert (gcr_prompt_get_choice_chosen (prompt) == FALSE);
g_assert_cmpint (gcr_prompt_get_password_strength (prompt), ==, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]