From owner-freebsd-bugs@FreeBSD.ORG Sun Sep 12 02:40:26 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2899A16A4DD for ; Sun, 12 Sep 2004 02:40:26 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0916243D31 for ; Sun, 12 Sep 2004 02:40:26 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8C2ePWK087001 for ; Sun, 12 Sep 2004 02:40:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8C2eP5h087000; Sun, 12 Sep 2004 02:40:25 GMT (envelope-from gnats) Resent-Date: Sun, 12 Sep 2004 02:40:25 GMT Resent-Message-Id: <200409120240.i8C2eP5h087000@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dan Lukes Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FD8D16A4CE for ; Sun, 12 Sep 2004 02:37:48 +0000 (GMT) Received: from kulesh.obluda.cz (kulesh.obluda.cz [193.179.22.243]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A74D43D31 for ; Sun, 12 Sep 2004 02:37:47 +0000 (GMT) (envelope-from dan@obluda.cz) Received: from kulesh.obluda.cz (localhost.eunet.cz [127.0.0.1]) by kulesh.obluda.cz (8.13.1/8.13.1) with ESMTP id i8C2bjmm007101 for ; Sun, 12 Sep 2004 04:37:46 +0200 (CEST) (envelope-from dan@obluda.cz) Received: (from root@localhost) by kulesh.obluda.cz (8.13.1/8.13.1/Submit) id i8C2bjwJ007100 for FreeBSD-gnats-submit@freebsd.org; Sun, 12 Sep 2004 04:37:45 +0200 (CEST) (envelope-from dan@obluda.cz) Message-Id: <200409120237.i8C2bjwJ007100@kulesh.obluda.cz> Date: Sun, 12 Sep 2004 04:37:45 +0200 (CEST) From: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/71620: [PATCH] cleanup of the usr.sbin/sysinstall code X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dan Lukes List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2004 02:40:26 -0000 >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: