diff mbox series

[BlueZ,1/3] client/player: fix printf format string

Message ID 20220923105141.20176-1-ceggers@arri.de (mailing list archive)
State Accepted
Commit 7b07f1f980598cf54c91642e6583613bd6185eb1
Headers show
Series [BlueZ,1/3] client/player: fix printf format string | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck success Make Check PASS
tedd_an/makecheckvalgrind success Make Check PASS
tedd_an/makedistcheck success Make Distcheck PASS
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS
tedd_an/incremental_build success Pass
tedd_an/scan_build warning Scan-Build: monitor/analyze.c:381:2: warning: Value stored to 'data' is never read data += sizeof(*hdr); ^ ~~~~~~~~~~~~ monitor/analyze.c:382:2: warning: Value stored to 'size' is never read size -= sizeof(*hdr); ^ ~~~~~~~~~~~~ monitor/analyze.c:398:2: warning: Value stored to 'data' is never read data += sizeof(*evt); ^ ~~~~~~~~~~~~ monitor/analyze.c:399:2: warning: Value stored to 'size' is never read size -= sizeof(*evt); ^ ~~~~~~~~~~~~ monitor/analyze.c:418:2: warning: Value stored to 'data' is never read data += sizeof(*evt); ^ ~~~~~~~~~~~~ monitor/analyze.c:419:2: warning: Value stored to 'size' is never read size -= sizeof(*evt); ^ ~~~~~~~~~~~~ monitor/analyze.c:527:2: warning: Value stored to 'data' is never read data += sizeof(subtype); ^ ~~~~~~~~~~~~~~~ monitor/analyze.c:528:2: warning: Value stored to 'size' is never read size -= sizeof(subtype); ^ ~~~~~~~~~~~~~~~ monitor/analyze.c:629:2: warning: Value stored to 'data' is never read data += sizeof(*hdr); ^ ~~~~~~~~~~~~ monitor/analyze.c:630:2: warning: Value stored to 'size' is never read size -= sizeof(*hdr); ^ ~~~~~~~~~~~~ monitor/analyze.c:646:2: warning: Value stored to 'data' is never read data += sizeof(*hdr); ^ ~~~~~~~~~~~~ monitor/analyze.c:647:2: warning: Value stored to 'size' is never read size -= sizeof(*hdr); ^ ~~~~~~~~~~~~ monitor/analyze.c:710:2: warning: Value stored to 'data' is never read data += sizeof(*hdr); ^ ~~~~~~~~~~~~ monitor/analyze.c:711:2: warning: Value stored to 'size' is never read size -= sizeof(*hdr); ^ ~~~~~~~~~~~~ 14 warnings generated. monitor/packet.c:410:4: warning: Value stored to 'ts_pos' is never read ts_pos += n; ^ ~ monitor/packet.c:455:4: warning: Value stored to 'pos' is never read pos += n; ^ ~ monitor/packet.c:7477:2: warning: Value stored to 'mask' is never read mask = tx_phys; ^ ~~~~~~~ monitor/packet.c:7485:2: warning: Value stored to 'mask' is never read mask = rx_phys; ^ ~~~~~~~ monitor/packet.c:11229:3: warning: Value stored to 'str' is never read str = "AoA Constant Tone Extension"; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ monitor/packet.c:11232:3: warning: Value stored to 'str' is never read str = "AoA Constant Tone Extension with 1us slots"; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ monitor/packet.c:11235:3: warning: Value stored to 'str' is never read str = "AoD Constant Tone Extension with 2us slots"; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ monitor/packet.c:11238:3: warning: Value stored to 'str' is never read str = "No Constant Tone Extension"; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ monitor/packet.c:11241:3: warning: Value stored to 'str' is never read str = "Reserved"; ^ ~~~~~~~~~~ monitor/packet.c:11242:3: warning: Value stored to 'color_on' is never read color_on = COLOR_RED; ^ ~~~~~~~~~ 10 warnings generated.

Commit Message

Christian Eggers Sept. 23, 2022, 10:51 a.m. UTC
Use macros from inttypes.h for correct printf format specifier for
int64_t
---
 client/player.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com Sept. 23, 2022, 12:19 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=679835

---Test result---

Test Summary:
CheckPatch                    PASS      2.07 seconds
GitLint                       PASS      1.40 seconds
Prep - Setup ELL              PASS      33.40 seconds
Build - Prep                  PASS      0.86 seconds
Build - Configure             PASS      10.63 seconds
Build - Make                  PASS      1109.03 seconds
Make Check                    PASS      13.06 seconds
Make Check w/Valgrind         PASS      357.62 seconds
Make Distcheck                PASS      304.53 seconds
Build w/ext ELL - Configure   PASS      10.74 seconds
Build w/ext ELL - Make        PASS      108.05 seconds
Incremental Build w/ patches  PASS      377.76 seconds
Scan Build                    WARNING   772.37 seconds

Details
##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches.
Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************
monitor/analyze.c:381:2: warning: Value stored to 'data' is never read
        data += sizeof(*hdr);
        ^       ~~~~~~~~~~~~
monitor/analyze.c:382:2: warning: Value stored to 'size' is never read
        size -= sizeof(*hdr);
        ^       ~~~~~~~~~~~~
monitor/analyze.c:398:2: warning: Value stored to 'data' is never read
        data += sizeof(*evt);
        ^       ~~~~~~~~~~~~
monitor/analyze.c:399:2: warning: Value stored to 'size' is never read
        size -= sizeof(*evt);
        ^       ~~~~~~~~~~~~
monitor/analyze.c:418:2: warning: Value stored to 'data' is never read
        data += sizeof(*evt);
        ^       ~~~~~~~~~~~~
monitor/analyze.c:419:2: warning: Value stored to 'size' is never read
        size -= sizeof(*evt);
        ^       ~~~~~~~~~~~~
monitor/analyze.c:527:2: warning: Value stored to 'data' is never read
        data += sizeof(subtype);
        ^       ~~~~~~~~~~~~~~~
monitor/analyze.c:528:2: warning: Value stored to 'size' is never read
        size -= sizeof(subtype);
        ^       ~~~~~~~~~~~~~~~
monitor/analyze.c:629:2: warning: Value stored to 'data' is never read
        data += sizeof(*hdr);
        ^       ~~~~~~~~~~~~
monitor/analyze.c:630:2: warning: Value stored to 'size' is never read
        size -= sizeof(*hdr);
        ^       ~~~~~~~~~~~~
monitor/analyze.c:646:2: warning: Value stored to 'data' is never read
        data += sizeof(*hdr);
        ^       ~~~~~~~~~~~~
monitor/analyze.c:647:2: warning: Value stored to 'size' is never read
        size -= sizeof(*hdr);
        ^       ~~~~~~~~~~~~
monitor/analyze.c:710:2: warning: Value stored to 'data' is never read
        data += sizeof(*hdr);
        ^       ~~~~~~~~~~~~
monitor/analyze.c:711:2: warning: Value stored to 'size' is never read
        size -= sizeof(*hdr);
        ^       ~~~~~~~~~~~~
14 warnings generated.
monitor/packet.c:410:4: warning: Value stored to 'ts_pos' is never read
                        ts_pos += n;
                        ^         ~
monitor/packet.c:455:4: warning: Value stored to 'pos' is never read
                        pos += n;
                        ^      ~
monitor/packet.c:7477:2: warning: Value stored to 'mask' is never read
        mask = tx_phys;
        ^      ~~~~~~~
monitor/packet.c:7485:2: warning: Value stored to 'mask' is never read
        mask = rx_phys;
        ^      ~~~~~~~
monitor/packet.c:11229:3: warning: Value stored to 'str' is never read
                str = "AoA Constant Tone Extension";
                ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monitor/packet.c:11232:3: warning: Value stored to 'str' is never read
                str = "AoA Constant Tone Extension with 1us slots";
                ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monitor/packet.c:11235:3: warning: Value stored to 'str' is never read
                str = "AoD Constant Tone Extension with 2us slots";
                ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monitor/packet.c:11238:3: warning: Value stored to 'str' is never read
                str = "No Constant Tone Extension";
                ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monitor/packet.c:11241:3: warning: Value stored to 'str' is never read
                str = "Reserved";
                ^     ~~~~~~~~~~
monitor/packet.c:11242:3: warning: Value stored to 'color_on' is never read
                color_on = COLOR_RED;
                ^          ~~~~~~~~~
10 warnings generated.




---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Sept. 26, 2022, 6 p.m. UTC | #2
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri, 23 Sep 2022 12:51:39 +0200 you wrote:
> Use macros from inttypes.h for correct printf format specifier for
> int64_t
> ---
>  client/player.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [BlueZ,1/3] client/player: fix printf format string
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=7b07f1f98059
  - [BlueZ,2/3] monitor: fix printf format strings
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=fa8411cf37a3
  - [BlueZ,3/3] tools: fix printf format strings
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e01e89179d4e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/client/player.c b/client/player.c
index 0daacabf3c27..30ae263c8e41 100644
--- a/client/player.c
+++ b/client/player.c
@@ -15,7 +15,7 @@ 
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <stdbool.h>
-#include <stdint.h>
+#include <inttypes.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -3056,7 +3056,7 @@  static void send_wait(struct timespec *t_start, uint32_t us)
 	delta_us = us - TS_USEC(&t_diff);
 
 	if (delta_us < 0) {
-		bt_shell_printf("Send is behind: %zd us - skip sleep",
+		bt_shell_printf("Send is behind: %" PRId64 " us - skip sleep",
 							delta_us);
 		delta_us = 1000;
 	}