From af837b2940678d161d79a470a92707e14fde1bb6 Mon Sep 17 00:00:00 2001 From: andysun2015 Date: Thu, 22 Oct 2020 00:50:42 +0800 Subject: [PATCH] Fix build warnings in Shadow demo due to snprintf and unreferenced formal parameter (#357) Fixes build warnings by making the following changes: - Add header file for snprintf to prevent building warning in Visual Studio. - Add for compiler warning about unused parameters. --- .../Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c b/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c index e6a61cccb6..3e1cb59258 100644 --- a/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c +++ b/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c @@ -50,6 +50,7 @@ /* Standard includes. */ #include #include +#include /* Kernel includes. */ #include "FreeRTOS.h" @@ -566,6 +567,9 @@ void prvShadowDemoTask( void * pvParameters ) { BaseType_t demoStatus = pdPASS; + /* Remove compiler warnings about unused parameters. */ + ( void ) pvParameters; + /* A buffer containing the update document. It has static duration to prevent * it from being placed on the call stack. */ static char pcUpdateDocument[ SHADOW_REPORTED_JSON_LENGTH + 1 ] = { 0 };