2006-03-21 13:48:26

by Knut Petersen

[permalink] [raw]
Subject: [BUG] compiler warning, kernel 2.6.16

If CONFIG_SWAP is _not_ set, gcc complains:

/src/linux-2.6.16-tfix/mm/vmscan.c: In function `remove_mapping':
/src/linux-2.6.16-tfix/mm/vmscan.c:398: warning: unused variable `swap'

cu,
knut


2006-03-21 22:36:14

by Andrew Morton

[permalink] [raw]
Subject: Re: [BUG] compiler warning, kernel 2.6.16

Knut Petersen <[email protected]> wrote:
>
> If CONFIG_SWAP is _not_ set, gcc complains:
>
> /src/linux-2.6.16-tfix/mm/vmscan.c: In function `remove_mapping':
> /src/linux-2.6.16-tfix/mm/vmscan.c:398: warning: unused variable `swap'
>

Yes, that's been there for ages. That code will be eliminated by the
compiler and I tend to think that the ugliness of making the warning go
away exceeds the benefit of stomping a !CONFIG_SWAP compile warning.