mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-12-18 16:59:12 +08:00
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.
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user