Subject: pkg/13960: cruft in zip1(1) build
To: SEND-PR <gnats-bugs@gnats.netbsd.org>
From: Don Yuniskis <auryn@gci-net.com>
List: netbsd-bugs
Date: 09/15/2001 14:34:36
>Number:         13960
>Category:       pkg
>Synopsis:       Cleanup compiler warnings; remove mktemp(3) risk
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 15 14:39:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Don Yuniskis
>Release:        NetBSD 1.5.1
>Organization:
 Don Yuniskis
>Environment:
System: NetBSD Itsy.Bitsy.Micro 1.5.1 NetBSD 1.5.1 (GENERIC) #56: Mon Jul 2
15:54:23 CEST 2001 he@nsa.uninett.no:/usr/src/sys/arch/i386/compile/GENERIC
i386


>Description:
 Trivial compiler warnings; use mkstemp(3) instead of mktemp(3)
>How-To-Repeat:
 Build code
>Fix:
 Apply patch


*** zipfile.c.old Thu Sep 13 08:42:11 2001
--- zipfile.c Thu Sep 13 08:44:00 2001
***************
*** 71,77 ****

  /* Local functions */
  #ifdef PROTO
!    local int zqcmp(voidp *, voidp *);
  #  ifndef UTIL
       local int zbcmp(voidp *, voidp far *);
       local char *cutpath(char *);
--- 71,77 ----

  /* Local functions */
  #ifdef PROTO
!    local int zqcmp(const voidp *, const voidp *);
  #  ifndef UTIL
       local int zbcmp(voidp *, voidp far *);
       local char *cutpath(char *);
***************
*** 80,86 ****


  local int zqcmp(a, b)
! voidp *a, *b;           /* pointers to pointers to zip entries */
  /* Used by qsort() to compare entries in the zfile list.  */
  {
    return strcmp((*(struct zlist far **)a)->zname,
--- 80,86 ----


  local int zqcmp(a, b)
! const voidp *a, *b;           /* pointers to pointers to zip entries */
  /* Used by qsort() to compare entries in the zfile list.  */
  {
    return strcmp((*(struct zlist far **)a)->zname,
*** crypt.c.old Thu Sep 13 08:46:20 2001
--- crypt.c Thu Sep 13 08:47:02 2001
***************
*** 23,29 ****
  local int decrypt_byte OF((void));
  local void update_keys OF((int c));
  local void init_keys OF((char *passwd));
!       int zencode OF((int c));
  local int zdecode OF((int c));

  local ulg keys[3]; /* keys defining the pseudo random sequence */
--- 23,29 ----
  local int decrypt_byte OF((void));
  local void update_keys OF((int c));
  local void init_keys OF((char *passwd));
! local int zencode OF((int c));
  local int zdecode OF((int c));

  local ulg keys[3]; /* keys defining the pseudo random sequence */
*** fileio.c.old Thu Sep 13 08:37:25 2001
--- fileio.c Thu Sep 13 08:45:05 2001
***************
*** 196,202 ****
  #include <unistd.h>
  #else
  /* Library functions not in (most) header files */
! char *mktemp OF((char *));
  int link OF((char *, char *));
  int unlink OF((char *));
  #if !defined(CONVEX) && !defined(AIX) && !defined(SYSV)
--- 196,202 ----
  #include <unistd.h>
  #else
  /* Library functions not in (most) header files */
! int mkstemp OF((char *));
  int link OF((char *, char *));
  int unlink OF((char *));
  #if !defined(CONVEX) && !defined(AIX) && !defined(SYSV)
***************
*** 239,246 ****
       local void closed(dstrm *);
  #  endif /* DIRENT */
     local char *readd(dstrm *);
!    local int fqcmp(voidp *, voidp *);
!    local int fqcmpz(voidp *, voidp *);
     local char *last(char *);
     local char *msname(char *);
  #  ifdef VMS
--- 239,246 ----
       local void closed(dstrm *);
  #  endif /* DIRENT */
     local char *readd(dstrm *);
!    local int fqcmp(const voidp *, const voidp *);
!    local int fqcmpz(const voidp *, const voidp *);
     local char *last(char *);
     local char *msname(char *);
  #  ifdef VMS
***************
*** 650,656 ****


  local int fqcmp(a, b)
! voidp *a, *b;           /* pointers to pointers to found entries */
  /* Used by qsort() to compare entries in the found list by name. */
  {
    return strcmp((*(struct flist far **)a)->name,
--- 650,656 ----


  local int fqcmp(a, b)
! const voidp *a, *b;           /* pointers to pointers to found entries */
  /* Used by qsort() to compare entries in the found list by name. */
  {
    return strcmp((*(struct flist far **)a)->name,
***************
*** 659,665 ****


  local int fqcmpz(a, b)
! voidp *a, *b;           /* pointers to pointers to found entries */
  /* Used by qsort() to compare entries in the found list by zname. */
  {
    return strcmp((*(struct flist far **)a)->zname,
--- 659,665 ----


  local int fqcmpz(a, b)
! const voidp *a, *b;           /* pointers to pointers to found entries */
  /* Used by qsort() to compare entries in the found list by zname. */
  {
    return strcmp((*(struct flist far **)a)->zname,
***************
*** 1472,1478 ****
    *p++ = '_';
    *p++ = (char)c;
    strcpy(p, "XXXXXX");
!   return mktemp(t);
  }


--- 1472,1479 ----
    *p++ = '_';
    *p++ = (char)c;
    strcpy(p, "XXXXXX");
!   mkstemp(t);
!   return t;
  }




>Release-Note:
>Audit-Trail:
>Unformatted:
 X-send-pr-version: 3.95