On Monday, November 10, 2014 09:13:08 PM Dimitry Andric wrote:
> I noted something similar for kgdb, when compiled with gcc:
> 
> cc1: warnings being treated as errors
> /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c: In function
> 'kgdb_trgt_fetch_tss': /usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c:142:
> warning: comparison is always false due to limited range of data type
> 
> In gnu/usr.bin/gdb/kgdb/kgdb.h, there is:
> 
> struct kthr {
>         struct kthr     *next;
>         uintptr_t       paddr;
>         uintptr_t       kaddr;
>         uintptr_t       kstack;
>         uintptr_t       pcb;
>         int             tid;
>         int             pid;
>         u_char          cpu;
> };
> 
> The cpu field is assigned from td.td_oncpu (which is an int) in
> kgdb_thr_add_procs(), so I think it should be safe to change it to an
> int too:
> 
> Index: gnu/usr.bin/gdb/kgdb/kgdb.h
> ===================================================================
> --- gnu/usr.bin/gdb/kgdb/kgdb.h (revision 274350)
> +++ gnu/usr.bin/gdb/kgdb/kgdb.h (working copy)
> @@ -41,7 +41,7 @@
>         uintptr_t       pcb;
>         int             tid;
>         int             pid;
> -       u_char          cpu;
> +       int             cpu;
>  };
> 
>  extern struct kthr *curkthr;

Yes, please commit.

-- 
John Baldwin
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to