Subject: lib/1101: compile warnings in liby
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: Thorsten Lockert <tholo@SigmaSoft.COM>
List: netbsd-bugs
Date: 06/03/1995 20:50:07
>Number:         1101
>Category:       lib
>Synopsis:       compile warnings in liby
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun  3 20:50:06 1995
>Originator:     Thorsten Lockert
>Organization:
SigmaSoft, Th. Lockert
>Release:        May 28, 1995
>Environment:
	
System: NetBSD gandalf.sigmasoft.com 1.0A NetBSD 1.0A (GANDALF) #1: Sun May 7 21:49:27 PDT 1995 tholo@gandalf.sigmasoft.com:/usr/src/sys/arch/i386/compile/GANDALF i386


>Description:
	There are several compile warnings in liby when compiled with
	-Wall -Wstrict-prototypes

>How-To-Repeat:
	Compile with -Wall -Wstrict-prototypes

>Fix:
	Apply the following patches:

diff -c src/lib/liby.orig/main.c src/lib/liby/main.c
*** src/lib/liby.orig/main.c	Sat Jun  3 20:22:50 1995
--- src/lib/liby/main.c	Sat Jun  3 20:28:05 1995
***************
*** 36,42 ****
  static char rcsid[] = "$Id: main.c,v 1.2 1993/08/01 18:31:35 mycroft Exp $";
  #endif /* not lint */
  
! main()
  {
  	exit(yyparse());
  }
--- 36,51 ----
  static char rcsid[] = "$Id: main.c,v 1.2 1993/08/01 18:31:35 mycroft Exp $";
  #endif /* not lint */
  
! #include <stdlib.h>
! 
! int yyparse __P((void));
! int main __P((int, char **, char **));
! 
! int
! main(argc, argv, envp)
! int argc;
! char **argv;
! char **envp;
  {
  	exit(yyparse());
  }
diff -c src/lib/liby.orig/yyerror.c src/lib/liby/yyerror.c
*** src/lib/liby.orig/yyerror.c	Sat Jun  3 20:22:50 1995
--- src/lib/liby/yyerror.c	Sat Jun  3 20:25:09 1995
***************
*** 38,45 ****
  
  #include <stdio.h>
  
  yyerror(msg)
! char *msg;
  {
  	(void)fprintf(stderr, "%s\n", msg);
  	return(0);
--- 38,48 ----
  
  #include <stdio.h>
  
+ int yyerror __P((const char *));
+ 
+ int
  yyerror(msg)
! const char *msg;
  {
  	(void)fprintf(stderr, "%s\n", msg);
  	return(0);
>Audit-Trail:
>Unformatted: