🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1199

oleo 1.2 returns value in signal functions yielding void

#1199
From: Paul Eggert
Date: Thu, 31 Dec 1992 13:23
73 lines
2455 bytes
When compiling oleo 1.2 (GCC 2.3.3, SunOS 4.1.2), I got the following
warning messages:

eval.c: In function `math_sig':
eval.c:1496: warning: `return' with a value, in function returning void
io-utils.c: In function `ignore_sig':
io-utils.c:85: warning: `return' with a value, in function returning void

Here is a patch.


Thu Dec 31 13:16:32 1992  Paul Eggert  (eggert@twinsun.com)

	* sysdef.h (SIGRET): Remove.  All invokers removed.
	This change might cause some harmless compiler warnings in
	old-fashioned hosts where signal functions yield `int', but
	that's better than always generating warnings in modern hosts
	where signal functions yield `void'.


===================================================================
RCS file: RCS/sysdef.h,v
retrieving revision 1.2
retrieving revision 1.2.1.1
diff -c -r1.2 -r1.2.1.1
*** sysdef.h	1992/11/28 03:29:02	1.2
--- sysdef.h	1992/12/31 13:16:32	1.2.1.1
***************
*** 33,41 ****
  
  #ifndef RETSIGTYPE
  #define RETSIGTYPE void
- #define SIGRET  return
- #else
- #define SIGRET  return 0
  #endif /* RETSIGTYPE */
  
  #ifndef VOIDSTAR
--- 33,38 ----
===================================================================
RCS file: RCS/eval.c,v
retrieving revision 1.2
retrieving revision 1.2.1.1
diff -c -r1.2 -r1.2.1.1
*** eval.c	1992/12/31 05:10:11	1.2
--- eval.c	1992/12/31 13:16:32	1.2.1.1
***************
*** 1493,1499 ****
  {
    stack[curstack].type = TYP_ERR;
    stack[curstack].Value = BAD_INPUT;
-   SIGRET;
  }
  
  #endif
--- 1493,1498 ----
===================================================================
RCS file: RCS/io-utils.c,v
retrieving revision 1.2
retrieving revision 1.2.1.1
diff -c -r1.2 -r1.2.1.1
*** io-utils.c	1992/12/31 05:09:50	1.2
--- io-utils.c	1992/12/31 13:16:32	1.2.1.1
***************
*** 82,88 ****
  ignore_sig (sig)
       int sig;
  {
-   SIGRET;
  }
  
  /* It's ok of this fails and generates signals.  In that case, 
--- 82,87 ----
Technical Details
Message-ID: <9212311323.AA20820@bi.twinsun.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bi.TWinsun.COM!eggert

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bi.TWinsun.COM!eggert
From: eggert@bi.TWinsun.COM (Paul Eggert)
Subject: oleo 1.2 returns value in signal functions yielding void
Message-ID: <9212311323.AA20820@bi.twinsun.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 31 Dec 1992 13:23:37 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 74