* IA32 - 6 New warnings (gcc 3.2.2)
@ 2003-09-26 5:48 John Cherry
2003-09-26 15:56 ` Adrian Bunk
0 siblings, 1 reply; 5+ messages in thread
From: John Cherry @ 2003-09-26 5:48 UTC (permalink / raw)
To: linux-kernel
drivers/char/drm/sis_mm.c:105: warning: implicit declaration of function `sis_free'
drivers/char/drm/sis_mm.c:135: warning: int format, long unsigned int arg (arg 3)
drivers/char/drm/sis_mm.c:92: warning: unused variable `req'
drivers/char/drm/sis_mm.c:98: warning: implicit declaration of function `sis_malloc'
sound/core/info.c:195: warning: comparison of distinct pointer types lacks a cast
sound/core/info.c:230: warning: comparison of distinct pointer types lacks a cast
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IA32 - 6 New warnings (gcc 3.2.2)
2003-09-26 5:48 IA32 - 6 New warnings (gcc 3.2.2) John Cherry
@ 2003-09-26 15:56 ` Adrian Bunk
2003-09-26 20:37 ` John Cherry
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2003-09-26 15:56 UTC (permalink / raw)
To: John Cherry; +Cc: linux-kernel
On Thu, Sep 25, 2003 at 10:48:35PM -0700, John Cherry wrote:
>...
> drivers/char/drm/sis_mm.c:92: warning: unused variable `req'
>...
Looking at the code, this seems to be a bogus warning in the gcc version
you are using.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IA32 - 6 New warnings (gcc 3.2.2)
2003-09-26 15:56 ` Adrian Bunk
@ 2003-09-26 20:37 ` John Cherry
2003-09-26 21:13 ` John Cherry
0 siblings, 1 reply; 5+ messages in thread
From: John Cherry @ 2003-09-26 20:37 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-kernel
On Fri, 2003-09-26 at 08:56, Adrian Bunk wrote:
> On Thu, Sep 25, 2003 at 10:48:35PM -0700, John Cherry wrote:
> >...
> > drivers/char/drm/sis_mm.c:92: warning: unused variable `req'
> >...
>
> Looking at the code, this seems to be a bogus warning in the gcc version
> you are using.
>
> cu
> Adrian
Yes, this warning looks bogus. Hard to understand why this was flagged
as a warning by gcc 3.2.2...
int sis_fb_alloc( DRM_IOCTL_ARGS )
{
drm_sis_mem_t fb;
--> struct sis_memreq req;
int retval = 0;
DRM_COPY_FROM_USER_IOCTL(fb, (drm_sis_mem_t *)data, sizeof(fb));
req.size = fb.size;
--> sis_malloc(&req);
if (req.offset) {
/* TODO */
fb.offset = req.offset;
fb.free = req.offset;
if (!add_alloc_set(fb.context, VIDEO_TYPE, fb.free)) {
DRM_DEBUG("adding to allocation set fails\n");
sis_free(req.offset);
retval = DRM_ERR(EINVAL);
}
} else {
fb.offset = 0;
fb.size = 0;
fb.free = 0;
}
<snip>
John
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IA32 - 6 New warnings (gcc 3.2.2)
2003-09-26 20:37 ` John Cherry
@ 2003-09-26 21:13 ` John Cherry
2003-09-26 21:49 ` Adrian Bunk
0 siblings, 1 reply; 5+ messages in thread
From: John Cherry @ 2003-09-26 21:13 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-kernel
The log for building sis_mm.c shows...
CC drivers/char/drm/sis_mm.o
drivers/char/drm/sis_mm.c:37:25: linux/sisfb.h: No such file or
directory
drivers/char/drm/sis_mm.c: In function `sis_fb_alloc':
drivers/char/drm/sis_mm.c:92: storage size of `req' isn't known
drivers/char/drm/sis_mm.c:98: warning: implicit declaration of function
`sis_malloc'
drivers/char/drm/sis_mm.c:105: warning: implicit declaration of function
`sis_free'
drivers/char/drm/sis_mm.c:92: warning: unused variable `req'
drivers/char/drm/sis_mm.c: In function `sis_fb_free':
drivers/char/drm/sis_mm.c:135: warning: int format, long unsigned int
arg (arg 3)
drivers/char/drm/sis_mm.c:135: warning: int format, long unsigned int
arg (arg 3)
The bug is that linux/sisfb.h should be video/sisfb.h on line 37 of
sis_m.c. The latest linus bk tree and mm kernel seem to have it right.
The snapshot for this build last night must have been between
changesets.
And...the warning makes sense in this context because sis_memreq is
undefined if sisfb.h is not included. :)
John
On Fri, 2003-09-26 at 13:37, John Cherry wrote:
> On Fri, 2003-09-26 at 08:56, Adrian Bunk wrote:
> > On Thu, Sep 25, 2003 at 10:48:35PM -0700, John Cherry wrote:
> > >...
> > > drivers/char/drm/sis_mm.c:92: warning: unused variable `req'
> > >...
> >
> > Looking at the code, this seems to be a bogus warning in the gcc version
> > you are using.
> >
> > cu
> > Adrian
>
> Yes, this warning looks bogus. Hard to understand why this was flagged
> as a warning by gcc 3.2.2...
>
> int sis_fb_alloc( DRM_IOCTL_ARGS )
> {
> drm_sis_mem_t fb;
> --> struct sis_memreq req;
> int retval = 0;
>
> DRM_COPY_FROM_USER_IOCTL(fb, (drm_sis_mem_t *)data, sizeof(fb));
>
> req.size = fb.size;
> --> sis_malloc(&req);
> if (req.offset) {
> /* TODO */
> fb.offset = req.offset;
> fb.free = req.offset;
> if (!add_alloc_set(fb.context, VIDEO_TYPE, fb.free)) {
> DRM_DEBUG("adding to allocation set fails\n");
> sis_free(req.offset);
> retval = DRM_ERR(EINVAL);
> }
> } else {
> fb.offset = 0;
> fb.size = 0;
> fb.free = 0;
> }
> <snip>
>
> John
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IA32 - 6 New warnings (gcc 3.2.2)
2003-09-26 21:13 ` John Cherry
@ 2003-09-26 21:49 ` Adrian Bunk
0 siblings, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2003-09-26 21:49 UTC (permalink / raw)
To: John Cherry; +Cc: linux-kernel
On Fri, Sep 26, 2003 at 02:13:12PM -0700, John Cherry wrote:
>...
> The bug is that linux/sisfb.h should be video/sisfb.h on line 37 of
> sis_m.c. The latest linus bk tree and mm kernel seem to have it right.
> The snapshot for this build last night must have been between
> changesets.
>...
Ah, thanks for the explanations and sorry for the noise.
> John
>...
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-09-26 21:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-26 5:48 IA32 - 6 New warnings (gcc 3.2.2) John Cherry
2003-09-26 15:56 ` Adrian Bunk
2003-09-26 20:37 ` John Cherry
2003-09-26 21:13 ` John Cherry
2003-09-26 21:49 ` Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).