[geany/geany] c61bc6: Work around a `-Wformat-overflow` warning

Matthew Brush git-noreply at xxxxx
Fri Jan 12 22:09:39 UTC 2018


Branch:      refs/heads/master
Author:      Matthew Brush <matt at geany.org>
Committer:   Matthew Brush <matt at geany.org>
Date:        Thu, 21 Dec 2017 02:58:49 UTC
Commit:      c61bc6784b45b50773bc0e1d1f83b09aed58ede6
             https://github.com/geany/geany/commit/c61bc6784b45b50773bc0e1d1f83b09aed58ede6

Log Message:
-----------
Work around a `-Wformat-overflow` warning

Requires -O3 optimization level to trigger the warning.

Discussed in and fixes #1683


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

Modified: src/build.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -2256,7 +2256,7 @@ static void build_load_menu_grp(GKeyFile *config, GeanyBuildCommand **dst, gint
 	gsize prefixlen; /* NOTE prefixlen used in macros above */
 	GeanyBuildCommand *dstcmd;
 	gchar *key;
-	static gchar cmdbuf[3] = "  ";
+	static gchar cmdbuf[4] = "  ";
 
 	if (*dst == NULL)
 		*dst = g_new0(GeanyBuildCommand, build_groups_count[grp]);



--------------
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