Linux bluetooth development
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v2 2/3] client: Fix missing strdup/memset declarations
Date: Thu,  7 Aug 2025 17:50:30 +0200	[thread overview]
Message-ID: <20250807155115.1037982-3-hadess@hadess.net> (raw)
In-Reply-To: <20250807155115.1037982-1-hadess@hadess.net>

bluez/client/display.c: In function ‘rl_prompt_input’:
bluez/client/display.c:112:24: error: implicit declaration of function ‘strdup’ [-Wimplicit-function-declaration]
  112 |         saved_prompt = strdup(rl_prompt);
      |                        ^~~~~~
bluez/client/display.c:112:24: warning: incompatible implicit declaration of built-in function ‘strdup’ [-Wbuiltin-declaration-mismatch]
bluez/client/display.c:119:9: error: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration]
  119 |         memset(prompt, 0, sizeof(prompt));
      |         ^~~~~~
bluez/client/display.c:24:1: note: include ‘<string.h>’ or provide a declaration of ‘memset’
   23 | #include "display.h"
  +++ |+#include <string.h>
   24 |
bluez/client/display.c:119:9: warning: incompatible implicit declaration of built-in function ‘memset’ [-Wbuiltin-declaration-mismatch]
  119 |         memset(prompt, 0, sizeof(prompt));
      |         ^~~~~~
bluez/client/display.c:119:9: note: include ‘<string.h>’ or provide a declaration of ‘memset’
---
 client/display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/client/display.c b/client/display.c
index a590a1388d26..95b734c91594 100644
--- a/client/display.c
+++ b/client/display.c
@@ -17,6 +17,7 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <stdbool.h>
+#include <string.h>
 #include <ctype.h>
 #include <readline/readline.h>
 
-- 
2.50.0


  parent reply	other threads:[~2025-08-07 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-07 15:50 [PATCH BlueZ v2 0/3] Prepare for meson build system Bastien Nocera
2025-08-07 15:50 ` [PATCH BlueZ v2 1/3] build: Move library source to lib/bluetooth Bastien Nocera
2025-08-07 17:15   ` Prepare for meson build system bluez.test.bot
2025-08-08 14:42   ` [PATCH BlueZ v2 1/3] build: Move library source to lib/bluetooth Luiz Augusto von Dentz
2025-08-08 15:17     ` Bastien Nocera
2025-08-07 15:50 ` Bastien Nocera [this message]
2025-08-07 15:50 ` [PATCH BlueZ v2 3/3] mesh: Fix 'buf’ may be used uninitialized warning Bastien Nocera
2025-08-11 12:50 ` [PATCH BlueZ v2 0/3] Prepare for meson build system patchwork-bot+bluetooth
2025-08-11 18:32 ` Pauli Virtanen
2025-08-11 18:37   ` Pauli Virtanen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250807155115.1037982-3-hadess@hadess.net \
    --to=hadess@hadess.net \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox