gnucash master: More '\0' -> NULL replacements to avoid clang warnings

Geert Janssens gjanssens at code.gnucash.org
Thu Jul 3 13:20:47 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/4b3373c9 (commit)
	from  https://github.com/Gnucash/gnucash/commit/1d3cee11 (commit)



commit 4b3373c96bf91c55416fbc1c6a06ff5db6760deb
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Thu Jul 3 19:20:33 2014 +0200

    More '\0' -> NULL replacements to avoid clang warnings

diff --git a/src/backend/sql/gnc-slots-sql.c b/src/backend/sql/gnc-slots-sql.c
index b61d43d..bc8e970 100644
--- a/src/backend/sql/gnc-slots-sql.c
+++ b/src/backend/sql/gnc-slots-sql.c
@@ -709,7 +709,7 @@ save_slot( const gchar* key, KvpValue* value, gpointer data )
 gboolean
 gnc_sql_slots_save( GncSqlBackend* be, const GncGUID* guid, gboolean is_infant, KvpFrame* pFrame )
 {
-    slot_info_t slot_info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME, NULL, g_string_new('\0') };
+    slot_info_t slot_info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME, NULL, g_string_new(NULL) };
 
     g_return_val_if_fail( be != NULL, FALSE );
     g_return_val_if_fail( guid != NULL, FALSE );
@@ -736,7 +736,7 @@ gnc_sql_slots_delete( GncSqlBackend* be, const GncGUID* guid )
     GncSqlResult* result;
     gchar guid_buf[GUID_ENCODING_LENGTH + 1];
     GncSqlStatement* stmt;
-    slot_info_t slot_info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME, NULL, g_string_new('\0') };
+    slot_info_t slot_info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME, NULL, g_string_new(NULL) };
 
     g_return_val_if_fail( be != NULL, FALSE );
     g_return_val_if_fail( guid != NULL, FALSE );
@@ -818,7 +818,7 @@ load_slot( slot_info_t *pInfo, GncSqlRow* row )
 void
 gnc_sql_slots_load( GncSqlBackend* be, QofInstance* inst )
 {
-    slot_info_t info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME, NULL, g_string_new('\0') };
+    slot_info_t info = { NULL, NULL, TRUE, NULL, 0, NULL, FRAME, NULL, g_string_new(NULL) };
     g_return_if_fail( be != NULL );
     g_return_if_fail( inst != NULL );
 



Summary of changes:
 src/backend/sql/gnc-slots-sql.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



More information about the gnucash-changes mailing list