Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions examples/c/SampleC-Guest/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#define _CRT_SECURE_NO_WARNINGS

#include <memory>
#include <chrono>
#include <thread>
Expand Down
1 change: 0 additions & 1 deletion examples/cpp/SampleCpp/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// #define _CRTDBG_MAP_ALLOC
#define _CRT_SECURE_NO_WARNINGS
//#include <stdlib.h>
//#include <crtdbg.h>

Expand Down
2 changes: 0 additions & 2 deletions examples/cpp/SampleCppMini/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#define _CRT_SECURE_NO_WARNINGS

#define API_KEY "99999999999999999999999999999999-99999999-9999-9999-9999-999999999999-9999"

#include <cstdio>
Expand Down
7 changes: 2 additions & 5 deletions examples/cpp/SampleCppUWP/Main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#define _CRT_SECURE_NO_WARNINGS

#include <stdlib.h>
#include <stdlib.h>
#include <stdio.h>

#include "LogManager.hpp"
Expand Down Expand Up @@ -44,7 +42,7 @@ void DebugPrintf(const char *fmt, ...)
va_start(args, fmt);
int nBuf;
char szBuffer[512];
nBuf = _vsnprintf(szBuffer, 511, fmt, args);
nBuf = _vsnprintf_s(szBuffer, 511, fmt, args);
// ::OutputDebugStringA(szBuffer);
PrintLine(szBuffer);
va_end(args);
Expand Down Expand Up @@ -231,7 +229,6 @@ EventProperties CreateSampleEvent(const char *name, EventPriority prio) {

// Prepare current time in UTC (seconds precision)
std::time_t t = std::time(nullptr);
std::gmtime(&t);

/* С++11 constructor for Visual Studio 2015: this is the most JSON-lookalike syntax that makes use of C++11 initializer lists. */
EventProperties props(name,
Expand Down
2 changes: 0 additions & 2 deletions examples/cpp/SampleCppUWP/TelemetryInstance.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#define _CRT_SECURE_NO_WARNINGS

#include "pch.h"

#include "LogManager.hpp"
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp/SampleCppUWP/Utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ static void DebugPrintf(const char *fmt, ...)
va_list args;
va_start(args, fmt);
int nBuf;
nBuf = _vsnprintf(szBuffer, MAX_BUFF_SIZE-1, fmt, args);
nBuf = _vsnprintf_s(szBuffer, MAX_BUFF_SIZE-1, fmt, args);
::OutputDebugStringA(szBuffer);
::OutputDebugStringA("\n"); // eppend endl
va_end(args);
Expand Down