You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2017/02/02 22:44:44 UTC
[1/2] incubator-mynewt-core git commit: kernel/os;
rename macro __bswap_XX -> os_bswap_XX. __bswap_32() is an inline
function in Linux system headers, and causes trouble with simulator builds.
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/1_0_0_b2_dev 0d848ae98 -> 196cf7d4b
kernel/os; rename macro __bswap_XX -> os_bswap_XX.
__bswap_32() is an inline function in Linux system headers,
and causes trouble with simulator builds.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/8c5c8fcd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/8c5c8fcd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/8c5c8fcd
Branch: refs/heads/1_0_0_b2_dev
Commit: 8c5c8fcdbed7769cc1ec2a079d812084e5c7a2f3
Parents: 0d848ae
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Feb 2 14:00:20 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu Feb 2 14:40:23 2017 -0800
----------------------------------------------------------------------
kernel/os/include/os/endian.h | 42 +++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8c5c8fcd/kernel/os/include/os/endian.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/endian.h b/kernel/os/include/os/endian.h
index b8b39b5..ca8698d 100644
--- a/kernel/os/include/os/endian.h
+++ b/kernel/os/include/os/endian.h
@@ -27,8 +27,8 @@ extern "C" {
#endif
/* Internal helpers */
-#ifndef __bswap_64
-#define __bswap_64(x) ((uint64_t) \
+#ifndef os_bswap_64
+#define os_bswap_64(x) ((uint64_t) \
((((x) & 0xff00000000000000ull) >> 56) | \
(((x) & 0x00ff000000000000ull) >> 40) | \
(((x) & 0x0000ff0000000000ull) >> 24) | \
@@ -39,16 +39,16 @@ extern "C" {
(((x) & 0x00000000000000ffull) << 56)))
#endif
-#ifndef __bswap_32
-#define __bswap_32(x) ((uint32_t) \
+#ifndef os_bswap_32
+#define os_bswap_32(x) ((uint32_t) \
((((x) & 0xff000000) >> 24) | \
(((x) & 0x00ff0000) >> 8) | \
(((x) & 0x0000ff00) << 8) | \
(((x) & 0x000000ff) << 24)))
#endif
-#ifndef __bswap_16
-#define __bswap_16(x) ((uint16_t) \
+#ifndef os_bswap_16
+#define os_bswap_16(x) ((uint16_t) \
((((x) & 0xff00) >> 8) | \
(((x) & 0x00ff) << 8)))
#endif
@@ -84,7 +84,7 @@ extern "C" {
#endif
#ifndef htole16
-#define htole16(x) __bswap_16 (x)
+#define htole16(x) os_bswap_16 (x)
#endif
#ifndef be16toh
@@ -92,7 +92,7 @@ extern "C" {
#endif
#ifndef le16toh
-#define le16toh(x) __bswap_16 (x)
+#define le16toh(x) os_bswap_16 (x)
#endif
#ifndef htobe32
@@ -100,7 +100,7 @@ extern "C" {
#endif
#ifndef htole32
-#define htole32(x) __bswap_32 (x)
+#define htole32(x) os_bswap_32 (x)
#endif
#ifndef be32toh
@@ -108,7 +108,7 @@ extern "C" {
#endif
#ifndef le32toh
-#define le32toh(x) __bswap_32 (x)
+#define le32toh(x) os_bswap_32 (x)
#endif
#ifndef htobe64
@@ -116,7 +116,7 @@ extern "C" {
#endif
#ifndef htole64
-#define htole64(x) __bswap_64 (x)
+#define htole64(x) os_bswap_64 (x)
#endif
#ifndef be64toh
@@ -124,13 +124,13 @@ extern "C" {
#endif
#ifndef le64toh
-#define le64toh(x) __bswap_64 (x)
+#define le64toh(x) os_bswap_64 (x)
#endif
#else
#ifndef ntohll
-#define ntohll(x) __bswap_64(x)
+#define ntohll(x) os_bswap_64(x)
#endif
#ifndef htonll
@@ -138,7 +138,7 @@ extern "C" {
#endif
#ifndef ntohl
-#define ntohl(x) __bswap_32(x)
+#define ntohl(x) os_bswap_32(x)
#endif
#ifndef htonl
@@ -146,7 +146,7 @@ extern "C" {
#endif
#ifndef htons
-#define htons(x) __bswap_16(x)
+#define htons(x) os_bswap_16(x)
#endif
#ifndef ntohs
@@ -154,7 +154,7 @@ extern "C" {
#endif
#ifndef htobe16
-#define htobe16(x) __bswap_16(x)
+#define htobe16(x) os_bswap_16(x)
#endif
#ifndef htole16
@@ -162,7 +162,7 @@ extern "C" {
#endif
#ifndef be16toh
-#define be16toh(x) __bswap_16(x)
+#define be16toh(x) os_bswap_16(x)
#endif
#ifndef le16toh
@@ -170,7 +170,7 @@ extern "C" {
#endif
#ifndef htobe32
-#define htobe32(x) __bswap_32(x)
+#define htobe32(x) os_bswap_32(x)
#endif
#ifndef htole32
@@ -178,7 +178,7 @@ extern "C" {
#endif
#ifndef be32toh
-#define be32toh(x) __bswap_32(x)
+#define be32toh(x) os_bswap_32(x)
#endif
#ifndef le32toh
@@ -186,7 +186,7 @@ extern "C" {
#endif
#ifndef htobe64
-#define htobe64(x) __builtin_bswap64(x)
+#define htobe64(x) os_bswap64(x)
#endif
#ifndef htole64
@@ -194,7 +194,7 @@ extern "C" {
#endif
#ifndef be64toh
-#define be64toh(x) __builtin_bswap64(x)
+#define be64toh(x) os_bswap64(x)
#endif
#ifndef le64toh
[2/2] incubator-mynewt-core git commit: nimble/controller;
silence compile warning about uninitialized variable.
Posted by ma...@apache.org.
nimble/controller; silence compile warning about uninitialized
variable.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/196cf7d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/196cf7d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/196cf7d4
Branch: refs/heads/1_0_0_b2_dev
Commit: 196cf7d4b6160a6b675a5e579128a8ce7413d84e
Parents: 8c5c8fc
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Feb 2 14:43:55 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu Feb 2 14:43:55 2017 -0800
----------------------------------------------------------------------
net/nimble/controller/src/ble_ll_conn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/196cf7d4/net/nimble/controller/src/ble_ll_conn.c
----------------------------------------------------------------------
diff --git a/net/nimble/controller/src/ble_ll_conn.c b/net/nimble/controller/src/ble_ll_conn.c
index 33a54f3..4a96467 100644
--- a/net/nimble/controller/src/ble_ll_conn.c
+++ b/net/nimble/controller/src/ble_ll_conn.c
@@ -2646,7 +2646,7 @@ ble_ll_conn_rx_isr_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr)
uint8_t conn_nesn;
uint8_t reply;
uint8_t rem_bytes;
- uint8_t opcode;
+ uint8_t opcode = 0;
uint8_t rx_pyld_len;
uint32_t endtime;
struct os_mbuf *txpdu;