From: Yann Collet Date: Sun, 1 Oct 2017 22:32:48 +0000 (-0700) Subject: blindfix for Visual : minor casting issue X-Git-Tag: v1.3.2~3^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd18095edcd3ae03201201de406a752a5395149b;p=thirdparty%2Fzstd.git blindfix for Visual : minor casting issue should not happen since SIGIGN is provided by , so it should work "ouf of the box" --- 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); }