svn commit: r273266 - in head: lib/libkvm sys/compat/freebsd32 sys/kern sys/sys
Dimitry Andric
dim at FreeBSD.org
Mon Nov 10 20:13:22 UTC 2014
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;
-Dimitry
> On 19 Oct 2014, at 06:38, Adrian Chadd <adrian at FreeBSD.org> wrote:
>
> Rebuilt, tested, committed to -HEAD.
>
> Thanks!
>
> -a
>
>
> On 18 October 2014 20:51, Adrian Chadd <adrian at freebsd.org> wrote:
>> .. actually, try this:
>>
>> adrian at testbox1:~/work/freebsd/head/src % svn diff sys/kern/
>> Index: sys/kern/kern_intr.c
>> ===================================================================
>> --- sys/kern/kern_intr.c (revision 272839)
>> +++ sys/kern/kern_intr.c (working copy)
>> @@ -362,8 +362,7 @@
>> {
>> struct intr_event *ie;
>> cpuset_t *mask;
>> - u_char cpu;
>> - int n;
>> + int cpu, n;
>>
>> mask = m;
>> cpu = NOCPU;
>> @@ -377,7 +376,7 @@
>> continue;
>> if (cpu != NOCPU)
>> return (EINVAL);
>> - cpu = (u_char)n;
>> + cpu = n;
>> }
>> }
>> ie = intr_lookup(irq);
>>
>>
>>
>>
>> -a
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20141110/b476155f/attachment.sig>
More information about the svn-src-head
mailing list