[geany/geany] bc7e64: Fix message formatting string

Matthew Brush git-noreply at xxxxx
Fri Aug 4 06:48:30 UTC 2017


Branch:      refs/heads/master
Author:      Matthew Brush <mbrush at codebrainz.ca>
Committer:   Matthew Brush <mbrush at codebrainz.ca>
Date:        Fri, 04 Aug 2017 06:48:30 UTC
Commit:      bc7e64f78f33ef867c9c1dfc2dc3ab76fd962ed1
             https://github.com/geany/geany/commit/bc7e64f78f33ef867c9c1dfc2dc3ab76fd962ed1

Log Message:
-----------
Fix message formatting string


Modified Paths:
--------------
    src/sciwrappers.c

Modified: src/sciwrappers.c
16 lines changed, 11 insertions(+), 5 deletions(-)
===================================================================
@@ -56,9 +56,6 @@ sptr_t sci_send_message_internal (const gchar *file, guint line, ScintillaObject
 
 	if (status != 0)
 	{
-		static const gchar *fmt = "%s:%u: scintilla has non-zero status "
-			"code '%d' after sending message '%u' to instance '%p' with "
-			"wParam='%llu' and lParam='%llu': %s";
 		const gchar *sub_msg = "unknown";
 		switch (status)
 		{
@@ -78,10 +75,19 @@ sptr_t sci_send_message_internal (const gchar *file, guint line, ScintillaObject
 					sub_msg = "unknown failure";
 				break;
 		}
+#define SCI_STATUS_FORMAT_STRING "%s:%u: scintilla has non-zero status " \
+			"code '%d' after sending message '%u' to instance '%p' with " \
+			"wParam='%lu' and lParam='%ld': %s"
 		if (status >= SC_STATUS_WARN_START)
-			g_warning(fmt, file, line, status, msg, (gpointer)sci, wparam, lparam, sub_msg);
+		{
+			g_warning(SCI_STATUS_FORMAT_STRING, file, line, status, msg,
+				(gpointer)sci, wparam, lparam, sub_msg);
+		}
 		else
-			g_critical(fmt, file, line, status, msg, (gpointer)sci, wparam, lparam, sub_msg);
+		{
+			g_critical(SCI_STATUS_FORMAT_STRING, file, line, status, msg,
+				(gpointer)sci, wparam, lparam, sub_msg);
+		}
 	}
 
 	return result;



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list