From 288841f66c808af70ad7687f9704c87075129b18 Mon Sep 17 00:00:00 2001 From: Yong He Date: Sat, 4 Nov 2017 16:09:48 -0400 Subject: fixed all warnings --- tools/slang-generate/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tools/slang-generate/main.cpp') diff --git a/tools/slang-generate/main.cpp b/tools/slang-generate/main.cpp index eef7d95c7..8208354e4 100644 --- a/tools/slang-generate/main.cpp +++ b/tools/slang-generate/main.cpp @@ -4,6 +4,7 @@ #include #include #include +#include "../../source/core/secure-crt.h" struct StringSpan { @@ -401,7 +402,8 @@ int main( // Read the contents o the file and translate it into a "template" file - FILE* inputStream = fopen(inputPath, "rb"); + FILE* inputStream; + fopen_s(&inputStream, inputPath, "rb"); fseek(inputStream, 0, SEEK_END); size_t inputSize = ftell(inputStream); fseek(inputStream, 0, SEEK_SET); @@ -415,9 +417,10 @@ int main( Node* node = readInput(input, inputEnd); char outputPath[1024]; - sprintf(outputPath, "%s.h", inputPath); + sprintf_s(outputPath, "%s.h", inputPath); - FILE* outputStream = fopen(outputPath, "w"); + FILE* outputStream; + fopen_s(&outputStream, outputPath, "w"); emitBody(outputStream, node); -- cgit v1.2.3