Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Sep 2004 04:37:45 +0200 (CEST)
From:      Dan Lukes <dan@obluda.cz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/71620: [PATCH] cleanup of the usr.sbin/sysinstall code
Message-ID:  <200409120237.i8C2bjwJ007100@kulesh.obluda.cz>
Resent-Message-ID: <200409120240.i8C2eP5h087000@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         71620
>Category:       bin
>Synopsis:       [PATCH] cleanup of the usr.sbin/sysinstall code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 12 02:40:24 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Dan Lukes
>Release:        FreeBSD 5.3-BETA3 i386
>Organization:
Obludarium
>Environment:
System: FreeBSD kulesh.obluda.cz 5.3-BETA3 FreeBSD 5.3-BETA3 #8: Sun Sep 5 07:06:40 CEST 2004 dan@kulesh.obluda.cz:/usr/obj/usr/src/sys/Dan i386
usr.sbin/sysinstall/system.c,v 1.123 2004/03/11 11:58:16 bde
usr.sbin/sysinstall/config.c,v 1.225.2.1 2004/09/02 01:54:59 kensmith
usr.sbin/sysinstall/Makefile,v 1.131 2003/11/20 20:43:06 jhb

>Description:
	There are more than 5000 warnings issued during "make buildworld".
Some of them are false positives, but some of them are sign of true errors.

	Nobody is upset by warnings due it's amount, so some errors remain
uncorrected.

	I want to cleanup the code-base from warnings, so warnings will
become "attention mark" again.

usr.sbin/sysinstall/system.c:103: warning: 'reap_children' defined but not used
usr.sbin/sysinstall/config.c:602: warning: 'write_root_xprofile' defined but not used
usr.sbin/sysinstall/config.c:627: warning: 'gotit' defined but not used
usr.sbin/sysinstall/index.c:619: warning: dereferencing type-punned pointer will break strict-aliasing rules


>How-To-Repeat:
	N/A
>Fix:
*** usr.sbin/sysinstall/system.c.ORIG	Wed Mar 17 01:05:00 2004
--- usr.sbin/sysinstall/system.c	Mon Sep  6 16:35:17 2004
***************
*** 95,100 ****
--- 95,101 ----
      restorescr(save);
  }
  
+ #if 0
  /*
   * Harvest children if we are init.
   */
***************
*** 107,112 ****
--- 108,114 ----
  	;
      errno = errbak;
  }
+ #endif
  
  /* Expand a file into a convenient location, nuking it each time */
  static char *
*** usr.sbin/sysinstall/config.c.ORIG	Fri Sep  3 10:03:52 2004
--- usr.sbin/sysinstall/config.c	Mon Sep  6 16:37:09 2004
***************
*** 597,639 ****
      return DITEM_SUCCESS;
  }
  
- static void
- write_root_xprofile(char *str)
- {
-     FILE *fp;
-     int len;
-     char **cp;
-     static char *flist[] = { /* take care of both xdm and startx */
- 	"/root/.xinitrc",
- 	"/root/.xsession",
- 	"/usr/share/skel/dot.xinitrc",
- 	"/usr/share/skel/dot.xsession",
- 	NULL,
-     };
- 
-     len = strlen(str);
-     for (cp = flist; *cp; cp++) {
- 	fp = fopen(*cp, "w");
- 	if (fp) {
- 	    fwrite(str, 1, len, fp);
- 	    fchmod(fileno(fp), 0755);
- 	    fclose(fp);
- 	}
-     }
- }
- 
- static int
- gotit(char *fname)
- {
-     char tmp[FILENAME_MAX];
- 
-     snprintf(tmp, sizeof tmp, "/usr/X11R6/bin/%s", fname);
-     if (file_executable(tmp))
- 	return TRUE;
-     snprintf(tmp, sizeof tmp, "/usr/local/bin/%s", fname);
-     return file_executable(tmp);
- }
- 
  int
  configResolv(dialogMenuItem *ditem)
  {
--- 597,602 ----
*** usr.sbin/sysinstall/Makefile.ORIG	Sat Dec  6 20:38:20 2003
--- usr.sbin/sysinstall/Makefile	Mon Sep  6 17:31:31 2004
***************
*** 18,24 ****
  SRCS+=  pccard.c
  .endif
  
! CFLAGS+= -DUSE_GZIP=1
  .if ${MACHINE} == "pc98"
  CFLAGS+= -DPC98
  .endif
--- 18,24 ----
  SRCS+=  pccard.c
  .endif
  
! CFLAGS+= -DUSE_GZIP=1 -fno-strict-aliasing
  .if ${MACHINE} == "pc98"
  CFLAGS+= -DPC98
  .endif
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409120237.i8C2bjwJ007100>