File: 06-fix_format_identifier.diff

package info (click to toggle)
textdraw 0.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 260 kB
  • sloc: ansic: 4,705; makefile: 8
file content (20 lines) | stat: -rw-r--r-- 668 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Author: Wolfram Sang <wsa@kernel.org>
Last-Update: 2026-02-22
Description: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ {aka ‘long unsigned int’}
---
 td.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: textdraw-0.2+ds/td.c
===================================================================
--- textdraw-0.2+ds.orig/td.c
+++ textdraw-0.2+ds/td.c
@@ -650,7 +650,7 @@ void save()		// save to file
 	}
 	fprintf(fil,"%d\n",lasttxt);
 	for(i=0;i<lasttxt;i++)
-	{	fprintf(fil,"%d %d %c %d %s\n",
+	{	fprintf(fil,"%d %d %c %zu %s\n",
 		txt[i].x,txt[i].y,txt[i].a,strlen(txt[i].t),txt[i].t);
 	}