Linux bluetooth development
 help / color / mirror / Atom feed
From: Richard Palethorpe <richard@lm-technologies.com>
To: linux-bluetooth@vger.kernel.org
Cc: Richard Palethorpe <richard@lm-technologies.com>
Subject: [PATCH] lib: Fix compilation error in C++ due to inline function
Date: Tue, 24 Mar 2015 14:52:24 +0000	[thread overview]
Message-ID: <1427208744-11805-1-git-send-email-richard@lm-technologies.com> (raw)

This adds explicit typecasts to an inline function to make it C++ compatible.
---
 lib/bluetooth.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bluetooth.h b/lib/bluetooth.h
index 6ca64b6..ab24443 100644
--- a/lib/bluetooth.h
+++ b/lib/bluetooth.h
@@ -345,8 +345,8 @@ typedef struct {
 
 static inline void bswap_128(const void *src, void *dst)
 {
-	const uint8_t *s = src;
-	uint8_t *d = dst;
+	const uint8_t *s = (const uint8_t *)src;
+	uint8_t *d = (uint8_t *)dst;
 	int i;
 
 	for (i = 0; i < 16; i++)
-- 
2.3.4


             reply	other threads:[~2015-03-24 14:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 14:52 Richard Palethorpe [this message]
2015-03-27  7:40 ` [PATCH] lib: Fix compilation error in C++ due to inline function Szymon Janc
2015-03-27 10:53   ` Richard Palethorpe
2015-03-27 10:59     ` Szymon Janc

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=1427208744-11805-1-git-send-email-richard@lm-technologies.com \
    --to=richard@lm-technologies.com \
    --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