Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-27 12:16:56 +0400
committerFelix Fietkau <nbd@openwrt.org>2011-10-27 12:16:56 +0400
commitfc20c7a0314afa07f4f873f1a2f1f0095bf8e519 (patch)
treef6eaf6832194ec0f24c0f9eba0c90eca2e3360f9 /blobmsg.h
parent01c6f73ed76ade6f05496f16d682699c02cb1eec (diff)
make casts from void * explicit to avoid C++ warnings (patch by Arthur Davis)
Diffstat (limited to 'blobmsg.h')
-rw-r--r--blobmsg.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/blobmsg.h b/blobmsg.h
index c266855..b4e6758 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -52,7 +52,7 @@ static inline int blobmsg_hdrlen(int namelen)
static inline const char *blobmsg_name(const struct blob_attr *attr)
{
- struct blobmsg_hdr *hdr = blob_data(attr);
+ struct blobmsg_hdr *hdr = (struct blobmsg_hdr *) blob_data(attr);
return (const char *) hdr->name;
}
@@ -63,7 +63,7 @@ static inline int blobmsg_type(const struct blob_attr *attr)
static inline void *blobmsg_data(const struct blob_attr *attr)
{
- struct blobmsg_hdr *hdr = blob_data(attr);
+ struct blobmsg_hdr *hdr = (struct blobmsg_hdr *) blob_data(attr);
return (char *) hdr + blobmsg_hdrlen(be16_to_cpu(hdr->namelen));
}
@@ -71,8 +71,8 @@ static inline int blobmsg_data_len(const struct blob_attr *attr)
{
uint8_t *start, *end;
- start = blob_data(attr);
- end = blobmsg_data(attr);
+ start = (uint8_t *) blob_data(attr);
+ end = (uint8_t *) blobmsg_data(attr);
return blob_len(attr) - (end - start);
}