[geany/geany] 1d8dd8: Fix some small type issues in printf formats

Colomban Wendling git-noreply at xxxxx
Thu Nov 7 20:28:23 UTC 2013


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Thu, 07 Nov 2013 20:28:23 UTC
Commit:      1d8dd84a47b7993f14ba4737c3fcd23f60697cee
             https://github.com/geany/geany/commit/1d8dd84a47b7993f14ba4737c3fcd23f60697cee

Log Message:
-----------
Fix some small type issues in printf formats


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

Modified: src/build.c
8 files changed, 4 insertions(+), 4 deletions(-)
===================================================================
@@ -315,7 +315,7 @@ static void printfcmds(void)
 	{ \
 		*fr=src; \
 		if (printbuildcmds) \
-			printf("cmd[%d,%d]=%d\n",cmdgrp,cmdindex,src); \
+			printf("cmd[%u,%u]=%u\n",cmdgrp,cmdindex,src); \
 		return &(cmds[cmdindex]); \
 	}
 
@@ -325,7 +325,7 @@ static void printfcmds(void)
 		{ \
 			*fr=src; \
 			if (printbuildcmds) \
-				printf("cmd[%d,%d]=%d\n",cmdgrp,cmdindex,src); \
+				printf("cmd[%u,%u]=%u\n",cmdgrp,cmdindex,src); \
 			return &(ft->cmds[cmdindex]); \
 		}
 
@@ -2414,7 +2414,7 @@ static void build_load_menu_grp(GKeyFile *config, GeanyBuildCommand **dst, gint
 		gchar *label;
 		if (cmd >= 100)
 			return; /* ensure no buffer overflow */
-		sprintf(cmdbuf, "%02d", cmd);
+		sprintf(cmdbuf, "%02u", cmd);
 		set_key_grp(key, groups[grp]);
 		set_key_cmd(key, cmdbuf);
 		set_key_fld(key, "LB");
@@ -2631,7 +2631,7 @@ static guint build_save_menu_grp(GKeyFile *config, GeanyBuildCommand *src, gint
 			static gchar cmdbuf[4] = "   ";
 			if (cmd >= 100)
 				return count; /* ensure no buffer overflow */
-			sprintf(cmdbuf, "%02d", cmd);
+			sprintf(cmdbuf, "%02u", cmd);
 			set_key_grp(key, groups[grp]);
 			set_key_cmd(key, cmdbuf);
 			if (src[cmd].exists)



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