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.
pull/358/head
andysun2015 4 years ago committed by GitHub
parent 398abbaa61
commit af837b2940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -50,6 +50,7 @@
/* Standard includes. */
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
/* 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 };

Loading…
Cancel
Save