Treat 'SIG_IGN' as a pointer.
authorLudovic Courtès <ludo@gnu.org>
Tue, 11 Oct 2016 08:57:43 +0000 (10:57 +0200)
committerAndy Wingo <wingo@pobox.com>
Wed, 1 Mar 2017 18:58:31 +0000 (19:58 +0100)
* libguile/posix.c (scm_system_star): Cast 'SIG_IGN' to
'scm_t_uintptr_t' and use 'scm_from_uintptr_t'.  This fixes an
'int-conversion' warning with GCC 6.2.

libguile/posix.c

index 686b801ffd1c1c5689604ce198eff4157cd36a65..041b8b129d017b8bf7ca3a31c948a19dd1176c15 100644 (file)
@@ -1,6 +1,6 @@
 /* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
  *   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
- *   2014 Free Software Foundation, Inc.
+ *   2014, 2016 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -1489,10 +1489,12 @@ SCM_DEFINE (scm_system_star, "system*", 0, 0, 1,
 
   scm_dynwind_begin (0);
   /* Make sure the child can't kill us (as per normal system call).  */
-  scm_dynwind_sigaction (SIGINT, scm_from_long ((long) SIG_IGN),
+  scm_dynwind_sigaction (SIGINT,
+                         scm_from_uintptr_t ((scm_t_uintptr) SIG_IGN),
                          SCM_UNDEFINED);
 #ifdef SIGQUIT
-  scm_dynwind_sigaction (SIGQUIT, scm_from_long ((long) SIG_IGN),
+  scm_dynwind_sigaction (SIGQUIT,
+                         scm_from_uintptr_t ((scm_t_uintptr) SIG_IGN),
                          SCM_UNDEFINED);
 #endif