aboutsummaryrefslogtreecommitdiff
path: root/packages/patches/format_string_checking-0.41-test06.patch
blob: 56d5518a4cefd8d5058c0be324f1df5d8fc8c8d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
Index: d_soundfile.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v
retrieving revision 1.12
diff -u -r1.12 d_soundfile.c
--- d_soundfile.c	9 Oct 2006 04:36:12 -0000	1.12
+++ d_soundfile.c	29 Nov 2007 14:01:06 -0000
@@ -758,7 +758,7 @@
     if (itemswritten < nframes) 
     {
         if (nframes < 0x7fffffff)
-            pd_error(obj, "soundfiler_write: %d out of %d bytes written",
+            pd_error(obj, "soundfiler_write: %ld out of %ld bytes written",
                 itemswritten, nframes);
             /* try to fix size fields in header */
         if (filetype == FORMAT_WAVE)
@@ -1088,7 +1088,7 @@
         framesinfile = (eofis - poswas) / (channels * bytespersamp);
         if (framesinfile > maxsize)
         {
-            pd_error(x, "soundfiler_read: truncated to %d elements", maxsize);
+            pd_error(x, "soundfiler_read: truncated to %ld elements", maxsize);
             framesinfile = maxsize;
         }
         if (framesinfile > bytelimit / (channels * bytespersamp))
Index: g_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_array.c,v
retrieving revision 1.11
diff -u -r1.11 g_array.c
--- g_array.c	15 Aug 2006 04:54:15 -0000	1.11
+++ g_array.c	29 Nov 2007 14:01:06 -0000
@@ -1136,12 +1136,12 @@
     t_array *a = garray_getarray_floatonly(x, &yonset, &elemsize);
     if (!a)
     {
-        error("%s: needs floating-point 'y' field", x->x_realname);
+        error("%s: needs floating-point 'y' field", x->x_realname->s_name);
         return (0);
     }
     else if (elemsize != sizeof(t_word))
     {
-        error("%s: has more than one field", x->x_realname);
+        error("%s: has more than one field", x->x_realname->s_name);
         return (0);
     }
     *size = garray_npoints(x);
@@ -1164,7 +1164,7 @@
     int yonset, i, elemsize;
     t_array *array = garray_getarray_floatonly(x, &yonset, &elemsize);
     if (!array)
-        error("%s: needs floating-point 'y' field", x->x_realname);
+        error("%s: needs floating-point 'y' field", x->x_realname->s_name);
     else for (i = 0; i < array->a_n; i++)
         *((float *)((char *)array->a_vec
             + elemsize * i) + yonset) = g;
@@ -1180,7 +1180,7 @@
     t_array *array = garray_getarray_floatonly(x, &yonset, &elemsize);
     if (!array)
     {
-        error("%s: needs floating-point 'y' field", x->x_realname);
+        error("%s: needs floating-point 'y' field", x->x_realname->s_name);
         return;
     }
     if (npoints == 0)
@@ -1259,7 +1259,7 @@
     t_array *array = garray_getarray_floatonly(x, &yonset, &elemsize);
     if (!array)
     {
-        error("%s: needs floating-point 'y' field", x->x_realname);
+        error("%s: needs floating-point 'y' field", x->x_realname->s_name);
         return;
     }
 
@@ -1294,7 +1294,7 @@
     t_array *array = garray_getarray_floatonly(x, &yonset, &elemsize);
     if (!array)
     {
-        error("%s: needs floating-point 'y' field", x->x_realname);
+        error("%s: needs floating-point 'y' field", x->x_realname->s_name);
         return;
     }
     if (argc < 2) return;
@@ -1375,7 +1375,7 @@
     t_array *array = garray_getarray_floatonly(x, &yonset, &elemsize);
     if (!array)
     {
-        error("%s: needs floating-point 'y' field", x->x_realname);
+        error("%s: needs floating-point 'y' field", x->x_realname->s_name);
         return;
     }
     nelem = array->a_n;
@@ -1411,7 +1411,7 @@
     t_array *array = garray_getarray_floatonly(x, &yonset, &elemsize);
     if (!array)
     {
-        error("%s: needs floating-point 'y' field", x->x_realname);
+        error("%s: needs floating-point 'y' field", x->x_realname->s_name);
         return;
     }
     canvas_makefilename(glist_getcanvas(x->x_glist), filename->s_name,
Index: g_canvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v
retrieving revision 1.18
diff -u -r1.18 g_canvas.c
--- g_canvas.c	9 Oct 2006 04:36:12 -0000	1.18
+++ g_canvas.c	29 Nov 2007 14:01:07 -0000
@@ -158,7 +158,7 @@
     if (!x) bug("canvas_getenv");
     while (!x->gl_env)
         if (!(x = x->gl_owner))
-            bug("t_canvasenvironment", x);
+            bug("t_canvasenvironment");
     return (x->gl_env);
 }
 
Index: m_pd.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v
retrieving revision 1.16.2.2
diff -u -r1.16.2.2 m_pd.h
--- m_pd.h	18 Jul 2007 00:20:12 -0000	1.16.2.2
+++ m_pd.h	29 Nov 2007 14:01:08 -0000
@@ -443,10 +443,10 @@
 EXTERN void postfloat(float f);
 EXTERN void postatom(int argc, t_atom *argv);
 EXTERN void endpost(void);
-EXTERN void error(const char *fmt, ...);
-EXTERN void verbose(int level, const char *fmt, ...);
-EXTERN void bug(const char *fmt, ...);
-EXTERN void pd_error(void *object, const char *fmt, ...);
+EXTERN void error(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+EXTERN void verbose(int level, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
+EXTERN void bug(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+EXTERN void pd_error(void *object, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
 EXTERN void sys_logerror(const char *object, const char *s);
 EXTERN void sys_unixerror(const char *object);
 EXTERN void sys_ouch(void);