Skip to content

Commit

Permalink
make snprintf.c compile again with the more strict compiler options w…
Browse files Browse the repository at this point in the history
…e have adopted since the relase of 4.83
  • Loading branch information
thomas-maeder committed May 24, 2020
1 parent 53a246e commit 58e00a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions platform/windows32/snprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
* http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010
*/

#ifdef _MSC_VER

/* these #includes are placed here rather than below the #ifdef because empty translation units are not allowed */
#include <stdarg.h>
#include <stdio.h>

#ifdef _MSC_VER

static int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap)
{
int result = -1;
Expand Down
5 changes: 3 additions & 2 deletions platform/windows64/snprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
* http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010
*/

#ifdef _MSC_VER

/* these #includes are placed here rather than below the #ifdef because empty translation units are not allowed */
#include <stdarg.h>
#include <stdio.h>

#ifdef _MSC_VER

static int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap)
{
int result = -1;
Expand Down

0 comments on commit 58e00a0

Please # to comment.