Don't call g_set_error () with a NULL format. (#153103, Robert Ögren)

Mon Sep 20 00:17:37 2004  Matthias Clasen  <maclas@gmx.de>

	* tests/option-test.c (error_test3_post_parse):
	* tests/option-test.c (error_test2_post_parse):
	* tests/option-test.c (error_test1_post_parse): Don't call
	g_set_error () with a NULL format.  (#153103, Robert Ögren)
This commit is contained in:
Matthias Clasen
2004-09-20 04:18:40 +00:00
committed by Matthias Clasen
parent 08fe920a50
commit 6aad158c67
6 changed files with 38 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ error_test1_post_parse (GOptionContext *context,
g_assert (error_test1_int == 20);
/* Set an error in the post hook */
g_set_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, NULL);
g_set_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "");
return FALSE;
}
@@ -138,7 +138,7 @@ error_test2_post_parse (GOptionContext *context,
g_assert (strcmp (error_test2_string, "bar") == 0);
/* Set an error in the post hook */
g_set_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, NULL);
g_set_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "");
return FALSE;
}
@@ -197,7 +197,7 @@ error_test3_post_parse (GOptionContext *context,
g_assert (error_test3_boolean);
/* Set an error in the post hook */
g_set_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, NULL);
g_set_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "");
return FALSE;
}