From bd18095edcd3ae03201201de406a752a5395149b Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Sun, 1 Oct 2017 15:32:48 -0700 Subject: [PATCH] blindfix for Visual : minor casting issue should not happen since SIGIGN is provided by , so it should work "ouf of the box" --- programs/fileio.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/programs/fileio.c b/programs/fileio.c index 83934beef..e22d2bac8 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -145,13 +145,15 @@ static clock_t g_time = 0; **************************************/ #include +typedef void (*signalHandler_f) (int); const char* g_artefact = NULL; void INThandler(int sig) { - signal(sig, SIG_IGN); - remove(g_artefact); + assert(sig==SIGINT); + signal(sig, (signalHandler_f)SIG_IGN); /* cast required to circumvent a bug in Visual Studio 2008 */ + if (g_artefact) remove(g_artefact); DISPLAY("\n"); - exit(1); + exit(2); }