diff options
author | José Bollo <jose.bollo@iot.bzh> | 2016-03-16 15:47:37 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2016-03-16 15:47:37 +0100 |
commit | 2f5957984835ffc7d4f03bb0094a93c575e3eb17 (patch) | |
tree | ad686e9afdb661f0f456c422618c0d28a576ea63 /plugins | |
parent | 2a94a1d9c8b6c9bd4a83b870dee1d3072120cb77 (diff) |
Add warning detection and improve
Change-Id: Id4fc86b86d55aac578d84b4d2357c1a2e600c58b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/afm-main-plugin/afm-main-plugin.c | 5 | ||||
-rw-r--r-- | plugins/samples/ClientCtx.c | 2 | ||||
-rw-r--r-- | plugins/samples/HelloWorld.c | 2 | ||||
-rw-r--r-- | plugins/session/token-api.c | 2 |
4 files changed, 3 insertions, 8 deletions
diff --git a/plugins/afm-main-plugin/afm-main-plugin.c b/plugins/afm-main-plugin/afm-main-plugin.c index 1fcc554b..2aa36763 100644 --- a/plugins/afm-main-plugin/afm-main-plugin.c +++ b/plugins/afm-main-plugin/afm-main-plugin.c @@ -69,11 +69,6 @@ static struct json_object *embed(AFB_request *request, const char *tag, struct j return result; } -static struct json_object *call(AFB_request *request, AFB_PostItem *item, const char *tag, struct json_object *(*fun)(AFB_request*,AFB_PostItem*)) -{ - return embed(request, tag, fun(request, item)); -} - static struct json_object *call_void(AFB_request *request, AFB_PostItem *item) { struct json_object *obj = jbus_call_sj_sync(jbus, request->api, "true"); diff --git a/plugins/samples/ClientCtx.c b/plugins/samples/ClientCtx.c index b4ac0e13..b2479f50 100644 --- a/plugins/samples/ClientCtx.c +++ b/plugins/samples/ClientCtx.c @@ -110,7 +110,7 @@ STATIC json_object* myClose (AFB_request *request) { } STATIC void freeCtxCB (MyClientContextT *ctx, MyPluginHandleT *handle, char *uuid) { - fprintf (stderr, "FreeCtxCB uuid=[%s] Plugin=[%s] count=[%d]", uuid, handle->anythingYouWant, ctx->count); + fprintf (stderr, "FreeCtxCB uuid=[%s] Plugin=[%s] count=[%d]", uuid, (char*)handle->anythingYouWant, ctx->count); free (ctx); // Note: handle should be free it is a static resource attached to plugin and not to session diff --git a/plugins/samples/HelloWorld.c b/plugins/samples/HelloWorld.c index d9106920..05bec957 100644 --- a/plugins/samples/HelloWorld.c +++ b/plugins/samples/HelloWorld.c @@ -20,7 +20,7 @@ #include "local-def.h" STATIC json_object* pingSample (AFB_request *request) { - static pingcount = 0; + static int pingcount = 0; json_object *response; char query [512]; int len; diff --git a/plugins/session/token-api.c b/plugins/session/token-api.c index 25d0b993..7073dac0 100644 --- a/plugins/session/token-api.c +++ b/plugins/session/token-api.c @@ -79,7 +79,7 @@ STATIC json_object* clientContextReset (AFB_request *request) { } // Close and Free context STATIC json_object* clientGetPing (AFB_request *request) { - static count=0; + static int count=0; json_object *jresp; jresp = json_object_new_object(); |