File: 02_fix_a_Wformat.patch

package info (click to toggle)
libmems 1.6.0%2B4725-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,164 kB
  • sloc: cpp: 21,579; ansic: 4,313; xml: 115; makefile: 107; sh: 26
file content (19 lines) | stat: -rw-r--r-- 555 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Author: Andrei Zavada <johnhommer@gmail.com>
Last-Update: 2015-04-18
Description: fix a -Wformat (boy, that's a bloody serious error)

---
 libMems/dmSML/dmsort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/libMems/dmSML/dmsort.c
+++ b/libMems/dmSML/dmsort.c
@@ -825,7 +825,7 @@ int InitdmSML( long working_mb, long buf
 		if ( fgets(buf, sizeof(buf), fp) )
 		{
 			sscanf(buf, "MemTotal: %ld kB", &memTotal);
-			fprintf( stderr, buf );
+			fprintf( stderr, "%s", buf );
 		}
 		fclose(fp);
 		// allocate about 6/10 of physical memory