🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Paul Eggert Thu, 31 Dec 1992 13:23
oleo 1.2 returns value in signal functions yielding void
#1199
Author: 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 ----
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads