NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/39266 (NetBSD/amd64 doesn't build with -Wextra)



The following reply was made to PR port-amd64/39266; it has been noted by GNATS.

From: Juan RP <xtraeme%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-amd64/39266 (NetBSD/amd64 doesn't build with -Wextra)
Date: Fri, 5 Sep 2008 13:26:07 +0200

 On Fri,  5 Sep 2008 11:13:04 +0000 (UTC)
 tron%NetBSD.org@localhost wrote:
 
 > State-Changed-Why:
 > Your patch doesn't apply anymore unfortunately. Can you please send me an
 > updated version?
 
 Here's the patch against HEAD:
 
 Index: arch/amd64/amd64/db_trace.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/amd64/amd64/db_trace.c,v
 retrieving revision 1.13
 diff -b -u -p -r1.13 db_trace.c
 --- arch/amd64/amd64/db_trace.c        2 Jul 2008 19:49:58 -0000       1.13
 +++ arch/amd64/amd64/db_trace.c        5 Sep 2008 11:21:21 -0000
 @@ -52,30 +52,30 @@ static int db_x86_64_regop(const struct 
   * Machine register set.
   */
  const struct db_variable db_regs[] = {
 -      { "ds",         dbreg(ds),     db_x86_64_regop },
 -      { "es",         dbreg(es),     db_x86_64_regop },
 -      { "fs",         dbreg(fs),     db_x86_64_regop },
 -      { "gs",         dbreg(gs),     db_x86_64_regop },
 -      { "rdi",        dbreg(rdi),    db_x86_64_regop },
 -      { "rsi",        dbreg(rsi),    db_x86_64_regop },
 -      { "rbp",        dbreg(rbp),    db_x86_64_regop },
 -      { "rbx",        dbreg(rbx),    db_x86_64_regop },
 -      { "rdx",        dbreg(rdx),    db_x86_64_regop },
 -      { "rcx",        dbreg(rcx),    db_x86_64_regop },
 -      { "rax",        dbreg(rax),    db_x86_64_regop },
 -      { "r8",         dbreg(r8),     db_x86_64_regop },
 -      { "r9",         dbreg(r9),     db_x86_64_regop },
 -      { "r10",        dbreg(r10),    db_x86_64_regop },
 -      { "r11",        dbreg(r11),    db_x86_64_regop },
 -      { "r12",        dbreg(r12),    db_x86_64_regop },
 -      { "r13",        dbreg(r13),    db_x86_64_regop },
 -      { "r14",        dbreg(r14),    db_x86_64_regop },
 -      { "r15",        dbreg(r15),    db_x86_64_regop },
 -      { "rip",        dbreg(rip),    db_x86_64_regop },
 -      { "cs",         dbreg(cs),     db_x86_64_regop },
 -      { "rflags",     dbreg(rflags), db_x86_64_regop },
 -      { "rsp",        dbreg(rsp),    db_x86_64_regop },
 -      { "ss",         dbreg(ss),     db_x86_64_regop },
 +      { "ds",         dbreg(ds),     db_x86_64_regop, NULL },
 +      { "es",         dbreg(es),     db_x86_64_regop, NULL },
 +      { "fs",         dbreg(fs),     db_x86_64_regop, NULL },
 +      { "gs",         dbreg(gs),     db_x86_64_regop, NULL },
 +      { "rdi",        dbreg(rdi),    db_x86_64_regop, NULL },
 +      { "rsi",        dbreg(rsi),    db_x86_64_regop, NULL },
 +      { "rbp",        dbreg(rbp),    db_x86_64_regop, NULL },
 +      { "rbx",        dbreg(rbx),    db_x86_64_regop, NULL },
 +      { "rdx",        dbreg(rdx),    db_x86_64_regop, NULL },
 +      { "rcx",        dbreg(rcx),    db_x86_64_regop, NULL },
 +      { "rax",        dbreg(rax),    db_x86_64_regop, NULL },
 +      { "r8",         dbreg(r8),     db_x86_64_regop, NULL },
 +      { "r9",         dbreg(r9),     db_x86_64_regop, NULL },
 +      { "r10",        dbreg(r10),    db_x86_64_regop, NULL },
 +      { "r11",        dbreg(r11),    db_x86_64_regop, NULL },
 +      { "r12",        dbreg(r12),    db_x86_64_regop, NULL },
 +      { "r13",        dbreg(r13),    db_x86_64_regop, NULL },
 +      { "r14",        dbreg(r14),    db_x86_64_regop, NULL },
 +      { "r15",        dbreg(r15),    db_x86_64_regop, NULL },
 +      { "rip",        dbreg(rip),    db_x86_64_regop, NULL },
 +      { "cs",         dbreg(cs),     db_x86_64_regop, NULL },
 +      { "rflags",     dbreg(rflags), db_x86_64_regop, NULL },
 +      { "rsp",        dbreg(rsp),    db_x86_64_regop, NULL },
 +      { "ss",         dbreg(ss),     db_x86_64_regop, NULL },
  };
  const struct db_variable * const db_eregs =
        db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
 Index: arch/amd64/amd64/mem.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/amd64/amd64/mem.c,v
 retrieving revision 1.13
 diff -b -u -p -r1.13 mem.c
 --- arch/amd64/amd64/mem.c     13 Feb 2008 12:48:11 -0000      1.13
 +++ arch/amd64/amd64/mem.c     5 Sep 2008 11:21:21 -0000
 @@ -108,7 +108,7 @@ dev_type_mmap(mmmmap);
  
  const struct cdevsw mem_cdevsw = {
        nullopen, nullclose, mmrw, mmrw, mmioctl,
 -      nostop, notty, nopoll, mmmmap, nokqfilter
 +      nostop, notty, nopoll, mmmmap, nokqfilter, D_OTHER
  };
  
  int check_pa_acc(paddr_t, vm_prot_t);
 Index: arch/xen/include/hypervisor.h
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/xen/include/hypervisor.h,v
 retrieving revision 1.25
 diff -b -u -p -r1.25 hypervisor.h
 --- arch/xen/include/hypervisor.h      14 Apr 2008 13:38:03 -0000      1.25
 +++ arch/xen/include/hypervisor.h      5 Sep 2008 11:21:43 -0000
 @@ -128,7 +128,7 @@ extern union start_info_union start_info
  #define xen_start_info (start_info_union.start_info)
  
  /* For use in guest OSes. */
 -volatile extern shared_info_t *HYPERVISOR_shared_info;
 +extern volatile shared_info_t *HYPERVISOR_shared_info;
  
  /* hypervisor.c */
  struct intrframe;
 Index: arch/xen/x86/intr.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/xen/x86/intr.c,v
 retrieving revision 1.20
 diff -b -u -p -r1.20 intr.c
 --- arch/xen/x86/intr.c        3 Jul 2008 14:02:25 -0000       1.20
 +++ arch/xen/x86/intr.c        5 Sep 2008 11:21:43 -0000
 @@ -131,11 +131,11 @@ __KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.2
  #include "ioapic.h"
  #include "opt_mpbios.h"
  /* for x86/i8259.c */
 -struct intrstub i8259_stubs[NUM_LEGACY_IRQS] = {{0}};
 +struct intrstub i8259_stubs[NUM_LEGACY_IRQS] = {{0,0}};
  #if NIOAPIC > 0
  /* for x86/ioapic.c */
 -struct intrstub ioapic_edge_stubs[MAX_INTR_SOURCES] = {{0}};
 -struct intrstub ioapic_level_stubs[MAX_INTR_SOURCES] = {{0}};
 +struct intrstub ioapic_edge_stubs[MAX_INTR_SOURCES] = {{0,0}};
 +struct intrstub ioapic_level_stubs[MAX_INTR_SOURCES] = {{0,0}};
  
  #include <machine/i82093var.h>
  int irq2vect[256] = {0};
 Index: arch/xen/x86/x86_xpmap.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/xen/x86/x86_xpmap.c,v
 retrieving revision 1.8
 diff -b -u -p -r1.8 x86_xpmap.c
 --- arch/xen/x86/x86_xpmap.c   14 Apr 2008 13:38:03 -0000      1.8
 +++ arch/xen/x86/x86_xpmap.c   5 Sep 2008 11:21:44 -0000
 @@ -819,11 +819,13 @@ xen_bootstrap_tables (vaddr_t old_pgd, v
                                pte[pl1_pi(page)] |= PG_RW;
                        }
                                
 -                      if ((page  >= old_pgd && page < old_pgd + (old_count * 
PAGE_SIZE)) || page >= new_pgd)
 +                      if ((page  >= old_pgd && page < old_pgd + (old_count * 
PAGE_SIZE))
 +                          || page >= new_pgd) {
                                __PRINTK(("va 0x%lx pa 0x%lx "
                                    "entry 0x%" PRIx64 " -> L1[0x%x]\n",
                                    page, page - KERNBASE,
                                    (int64_t)pte[pl1_pi(page)], pl1_pi(page)));
 +                      }
                        page += PAGE_SIZE;
                }
  
 Index: arch/xen/xen/xenevt.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/xen/xen/xenevt.c,v
 retrieving revision 1.28
 diff -b -u -p -r1.28 xenevt.c
 --- arch/xen/xen/xenevt.c      7 Jun 2008 20:07:42 -0000       1.28
 +++ arch/xen/xen/xenevt.c      5 Sep 2008 11:21:45 -0000
 @@ -95,7 +95,7 @@ dev_type_read(xenevtread);
  dev_type_mmap(xenevtmmap);
  const struct cdevsw xenevt_cdevsw = {
        xenevtopen, nullclose, xenevtread, nowrite, noioctl,
 -      nostop, notty, nopoll, xenevtmmap, nokqfilter,
 +      nostop, notty, nopoll, xenevtmmap, nokqfilter, D_OTHER
  };
  
  /* minor numbers */
 @@ -387,7 +387,7 @@ xenevt_fclose(struct file *fp)
        for (i = 0; i < NR_EVENT_CHANNELS; i++ ) {
                if (devevent[i] == d) {
  #ifdef XEN3
 -                      evtchn_op_t op = { 0 };
 +                      evtchn_op_t op = { .cmd = 0 };
                        int error;
  #endif
                        hypervisor_mask_event(i);
 @@ -519,7 +519,7 @@ xenevt_fioctl(struct file *fp, u_long cm
  {
        struct xenevt_d *d = fp->f_data;
  #ifdef XEN3
 -      evtchn_op_t op = { 0 };
 +      evtchn_op_t op = { .cmd = 0 };
        int error;
  #else
        u_int *arg = addr;
 Index: arch/xen/xen/xengnt.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/xen/xen/xengnt.c,v
 retrieving revision 1.7
 diff -b -u -p -r1.7 xengnt.c
 --- arch/xen/xen/xengnt.c      27 Apr 2008 19:28:45 -0000      1.7
 +++ arch/xen/xen/xengnt.c      5 Sep 2008 11:21:45 -0000
 @@ -171,7 +171,7 @@ xengnt_get_entry()
        grant_ref_t entry;
        int s = splvm();
        static struct timeval xengnt_nonmemtime;
 -      const static struct timeval xengnt_nonmemintvl = {5,0};
 +      static const struct timeval xengnt_nonmemintvl = {5,0};
  
        if (last_gnt_entry == 0) {
                if (xengnt_more_entries()) {
 Index: arch/xen/xenbus/xenbus_client.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/xen/xenbus/xenbus_client.c,v
 retrieving revision 1.8
 diff -b -u -p -r1.8 xenbus_client.c
 --- arch/xen/xenbus/xenbus_client.c    15 Dec 2007 00:39:24 -0000      1.8
 +++ arch/xen/xenbus/xenbus_client.c    5 Sep 2008 11:21:45 -0000
 @@ -241,8 +241,12 @@ xenbus_alloc_evtchn(struct xenbus_device
  {
        evtchn_op_t op = {
                .cmd = EVTCHNOP_alloc_unbound,
 -              .u.alloc_unbound.dom = DOMID_SELF,
 -              .u.alloc_unbound.remote_dom = dev->xbusd_otherend_id };
 +              .u.alloc_unbound = {
 +                      .dom = DOMID_SELF,
 +                      .remote_dom = dev->xbusd_otherend_id,
 +                      .port = 0
 +              }
 +      };
  
        int err = HYPERVISOR_event_channel_op(&op);
        if (err)
 Index: arch/xen/xenbus/xenbus_probe.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/xen/xenbus/xenbus_probe.c,v
 retrieving revision 1.21
 diff -b -u -p -r1.21 xenbus_probe.c
 --- arch/xen/xenbus/xenbus_probe.c     2 Jun 2008 20:54:59 -0000       1.21
 +++ arch/xen/xenbus/xenbus_probe.c     5 Sep 2008 11:21:45 -0000
 @@ -525,7 +525,7 @@ xenbus_probe_init(void *unused)
  #if defined(DOM0OPS)
                vaddr_t page;
                paddr_t ma;
 -              evtchn_op_t op = { 0 };
 +              evtchn_op_t op = { .cmd = 0 };
                int ret;
  
                /* Allocate page. */
 Index: compat/linux32/common/linux32_exec.c
 ===================================================================
 RCS file: /cvsroot/src/sys/compat/linux32/common/linux32_exec.c,v
 retrieving revision 1.13
 diff -b -u -p -r1.13 linux32_exec.c
 --- compat/linux32/common/linux32_exec.c       28 Apr 2008 20:23:44 -0000      
1.13
 +++ compat/linux32/common/linux32_exec.c       5 Sep 2008 11:21:47 -0000
 @@ -116,6 +116,9 @@ const struct emul emul_linux32 = {
        NULL,
        NULL,
        netbsd32_vm_default_addr,
 +      NULL,
 +      0,
 +      NULL
  };
  
  static void
 ---- END ----
 


Home | Main Index | Thread Index | Old Index