1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/wakaama/patches/0009-fixed-warnings-in-observe.c.patch
Jose Alamos 82c7eac041 pkg/wakaama: Bump to v1.0
- copy basic objects from client implementation

- fix pkg warnings

- use lwm2m_strdup instead of strdup

- fix alignment problem in lwm2m data struct

- add fix of acc_ctrl object read
2019-02-27 10:48:08 +01:00

43 lines
1.8 KiB
Diff

From 13db42af916c31f9b6407a4f6f8ff800f3ac769b Mon Sep 17 00:00:00 2001
From: Christian Manal <moenoel@informatik.uni-bremen.de>
Date: Mon, 7 May 2018 18:26:08 +0200
Subject: [PATCH] fixed warnings in observe.c
---
core/observe.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/core/observe.c b/core/observe.c
index 0f2f1dd..8858a68 100644
--- a/core/observe.c
+++ b/core/observe.c
@@ -164,6 +164,7 @@ uint8_t observe_handleRequest(lwm2m_context_t * contextP,
lwm2m_observed_t * observedP;
lwm2m_watcher_t * watcherP;
uint32_t count;
+ (void)size;
LOG_ARG("Code: %02X, server status: %s", message->code, STR_STATUS(serverP->status));
LOG_URI(uriP);
@@ -653,7 +654,7 @@ void observe_step(lwm2m_context_t * contextP,
{
LOG_ARG("Checking minimal period (%d s)", watcherP->parameters->minPeriod);
- if (watcherP->lastTime + watcherP->parameters->minPeriod > currentTime)
+ if (watcherP->lastTime + (time_t)watcherP->parameters->minPeriod > currentTime)
{
// Minimum Period did not elapse yet
interval = watcherP->lastTime + watcherP->parameters->minPeriod - currentTime;
@@ -675,7 +676,7 @@ void observe_step(lwm2m_context_t * contextP,
{
LOG_ARG("Checking maximal period (%d s)", watcherP->parameters->maxPeriod);
- if (watcherP->lastTime + watcherP->parameters->maxPeriod <= currentTime)
+ if (watcherP->lastTime + (time_t)watcherP->parameters->maxPeriod <= currentTime)
{
LOG("Notify on maximal period");
notify = true;
--
2.1.4