File: 0009-Fix-printf-specifier-for-long-int-to-avoid-following.patch

package info (click to toggle)
nyquist 3.20%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 58,008 kB
  • sloc: ansic: 74,743; lisp: 17,929; java: 10,723; cpp: 6,690; sh: 171; xml: 58; makefile: 40; python: 15
file content (35 lines) | stat: -rw-r--r-- 2,008 bytes parent folder | download | duplicates (3)
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
From: Steve Robbins <steve@sumost.ca>
Date: Sat, 22 Oct 2022 21:34:09 -0500
Subject: Fix printf specifier for long int to avoid following warning.
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

/home/steve/Packages/nyquist/build-area/nyquist-3.20+ds/cmupv/src/cmupv.c: In function ‘pv_get_output2’:
/home/steve/Packages/nyquist/build-area/nyquist-3.20+ds/cmupv/src/cmupv.c:1093:62: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
 1093 |     D printf("pv_get_output2 returning at offset %ld abs %I64d\n",
      |                                                          ~~~~^
      |                                                              |
      |                                                              int
      |                                                          %I64ld
 1094 |              (long) (pv->out_next - pv->output_buffer), pv->output_total);
      |                                                         ~~~~~~~~~~~~~~~~
      |                                                           |
      |                                                           int64_t {aka long int}
---
 cmupv/src/cmupv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmupv/src/cmupv.c b/cmupv/src/cmupv.c
index 304e57a..be93264 100644
--- a/cmupv/src/cmupv.c
+++ b/cmupv/src/cmupv.c
@@ -1090,7 +1090,7 @@ float *pv_get_output2(Phase_vocoder x)
                (long) (out_next - output_buffer),
                (long) (pv->output_total - (out_next - output_buffer)));
     }
-    D printf("pv_get_output2 returning at offset %ld abs %I64d\n", 
+    D printf("pv_get_output2 returning at offset %ld abs %I64ld\n",
              (long) (pv->out_next - pv->output_buffer), pv->output_total);
     /*DBG out_next position is output_total, so if we subtract out_next - output_buffer,
        we get the absolute position of the output_buffer