projects
/
project
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
01c6f73
)
make casts from void * explicit to avoid C++ warnings (patch by Arthur Davis)
author
Felix Fietkau
<nbd@openwrt.org>
Thu, 27 Oct 2011 08:16:56 +0000
(10:16 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Thu, 27 Oct 2011 08:16:56 +0000
(10:16 +0200)
blobmsg.h
patch
|
blob
|
history
diff --git
a/blobmsg.h
b/blobmsg.h
index c266855245ab80b69ef77e8faf2ae15d7c731bdf..b4e6758a4951a8c6a6849844675c039ab4d15453 100644
(file)
--- 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)
{
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;
}
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)
{
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));
}
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;
{
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);
}
return blob_len(attr) - (end - start);
}