aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-04-23 09:06:24 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2019-04-23 09:06:24 +0000
commit78fcce21a8b611de175223bff67f4a49fa95e64e (patch)
tree0e8d47f75aadf474c0cc4e7649620c9bae4f7fd4
parenta1e6d2c08445030fc35e98f5b97dd1a10024fe62 (diff)
parent92c9d33f206d5a69cafdb213746c82e4d817de89 (diff)
Merge changes Id24d9bb0,I6807ed25
* changes: change style initialization of struct afb_auth missing full initialization for struct afb_verb_v3
-rw-r--r--bindings/samples/AuthLogin.c2
-rw-r--r--bindings/samples/DemoContext.c2
-rw-r--r--include/afb/c++/binding-wrap.hpp18
3 files changed, 11 insertions, 11 deletions
diff --git a/bindings/samples/AuthLogin.c b/bindings/samples/AuthLogin.c
index 851faecd..df001fd1 100644
--- a/bindings/samples/AuthLogin.c
+++ b/bindings/samples/AuthLogin.c
@@ -112,7 +112,7 @@ static const struct afb_verb_v3 verbs[]= {
{.verb="refresh" , .session=AFB_SESSION_LOA_1 | AFB_SESSION_RENEW, .callback=clientContextRefresh,.info="Refresh Client Authentication Token"},
{.verb="check" , .session=AFB_SESSION_LOA_1 , .callback=clientContextCheck ,.info="Check Client Authentication Token"},
{.verb="logout" , .session=AFB_SESSION_LOA_1 | AFB_SESSION_CLOSE, .callback=clientContextLogout ,.info="Logout Client and Free resources"},
- {NULL}
+ {0, 0, 0, 0, 0, 0, 0}
};
const struct afb_binding_v3 afbBindingV3 =
diff --git a/bindings/samples/DemoContext.c b/bindings/samples/DemoContext.c
index f1e90139..cb8e86f0 100644
--- a/bindings/samples/DemoContext.c
+++ b/bindings/samples/DemoContext.c
@@ -127,7 +127,7 @@ static const struct afb_verb_v3 verbs[]= {
{.verb="check_loa_ge_1", .session=AFB_SESSION_LOA_1, .callback=clientCheckLOA ,.vcbdata=(void*)(intptr_t)1 ,.info="Check whether level of assurance is greater or equal to 1"},
{.verb="check_loa_ge_2", .session=AFB_SESSION_LOA_2, .callback=clientCheckLOA ,.vcbdata=(void*)(intptr_t)2 ,.info="Check whether level of assurance is greater or equal to 2"},
{.verb="check_loa_ge_3", .session=AFB_SESSION_LOA_3, .callback=clientCheckLOA ,.vcbdata=(void*)(intptr_t)3 ,.info="Check whether level of assurance is greater or equal to 3"},
- {NULL}
+ {0, 0, 0, 0, 0, 0, 0}
};
const struct afb_binding_v3 afbBindingV3 =
diff --git a/include/afb/c++/binding-wrap.hpp b/include/afb/c++/binding-wrap.hpp
index ae0e5eeb..a23e5537 100644
--- a/include/afb/c++/binding-wrap.hpp
+++ b/include/afb/c++/binding-wrap.hpp
@@ -631,28 +631,28 @@ inline bool callsync(const char *api, const char *verb, struct json_object *args
constexpr afb_auth auth_no()
{
- afb_auth r = { afb_auth_No, 0, 0};
+ afb_auth r = { afb_auth_No, {0}, nullptr};
r.type = afb_auth_No;
return r;
}
constexpr afb_auth auth_yes()
{
- afb_auth r = { afb_auth_No, 0, 0};
+ afb_auth r = { afb_auth_No, {0}, nullptr};
r.type = afb_auth_Yes;
return r;
}
constexpr afb_auth auth_token()
{
- afb_auth r = { afb_auth_No, 0, 0};
+ afb_auth r = { afb_auth_No, {0}, nullptr};
r.type = afb_auth_Token;
return r;
}
constexpr afb_auth auth_LOA(unsigned loa)
{
- afb_auth r = { afb_auth_No, 0, 0};
+ afb_auth r = { afb_auth_No, {0}, nullptr};
r.type = afb_auth_LOA;
r.loa = loa;
return r;
@@ -660,7 +660,7 @@ constexpr afb_auth auth_LOA(unsigned loa)
constexpr afb_auth auth_permission(const char *permission)
{
- afb_auth r = { afb_auth_No, 0, 0};
+ afb_auth r = { afb_auth_No, {0}, nullptr};
r.type = afb_auth_Permission;
r.text = permission;
return r;
@@ -668,7 +668,7 @@ constexpr afb_auth auth_permission(const char *permission)
constexpr afb_auth auth_not(const afb_auth *other)
{
- afb_auth r = { afb_auth_No, 0, 0};
+ afb_auth r = { afb_auth_No, {0}, nullptr};
r.type = afb_auth_Not;
r.first = other;
return r;
@@ -681,7 +681,7 @@ constexpr afb_auth auth_not(const afb_auth &other)
constexpr afb_auth auth_or(const afb_auth *first, const afb_auth *next)
{
- afb_auth r = { afb_auth_No, 0, 0};
+ afb_auth r = { afb_auth_No, {0}, nullptr};
r.type = afb_auth_Or;
r.first = first;
r.next = next;
@@ -695,7 +695,7 @@ constexpr afb_auth auth_or(const afb_auth &first, const afb_auth &next)
constexpr afb_auth auth_and(const afb_auth *first, const afb_auth *next)
{
- afb_auth r = { afb_auth_No, 0, 0};
+ afb_auth r = { afb_auth_No, {0}, nullptr};
r.type = afb_auth_And;
r.first = first;
r.next = next;
@@ -723,7 +723,7 @@ constexpr afb_verb_t verb(
r.info = info;
r.session = session;
r.auth = auth;
- r.glob = (unsigned)glob;
+ r.glob = (uint16_t)glob;
r.vcbdata = vcbdata;
return r;
}