Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2013 15:40:32 -0800
From:      hiren panchasara <hiren.panchasara@gmail.com>
To:        hiren panchasara <hiren.panchasara@gmail.com>,  freebsd-current <freebsd-current@freebsd.org>, sbruno@freebsd.org
Subject:   Re: Clang warning patches
Message-ID:  <CALCpEUFKmpBGFvMzLUpB-6tXKL0GDwQ7kxiGb6GSf4SoMt-haA@mail.gmail.com>
In-Reply-To: <20130115232216.GE1410@funkthat.com>
References:  <CALCpEUEEPJFhrJMBii-3HHGsK3VUYgfgsh5cfGiC1ZsgWPDhPg@mail.gmail.com> <20130115231047.GD1410@funkthat.com> <20130115232216.GE1410@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 15, 2013 at 3:22 PM, John-Mark Gurney <jmg@funkthat.com> wrote:
> John-Mark Gurney wrote this message on Tue, Jan 15, 2013 at 15:10 -0800:
>> hiren panchasara wrote this message on Tue, Jan 15, 2013 at 07:52 -0800:
>> > http://www.strugglingcoder.info/patches/clang_warnings_dev_bktr.txt
>>
>> This patch does not look correct at all...  It is simply removing code..
>>
>> How is is good that after we failed to set the tv_freq that we continue
>> on?
>>
>> What is the warning that we are fixing here?
>
> I forgot to look at the intermediate variable that tv_channel was being
> assigned to...  Turns out it's an unsigned int, while tv_channel is
> returning an int...  We should fix this properly by changing temp to
> be an int, or moving the check inline instead of removing it blindly...

I agree. My bad. I should have looked at it a little more carefully.

Turning temp to "int" looks fine. All function returns being assigned to temp
are int.

>
> I think I still have an old bktr card that I can throw in to do some
> basic testing...

I will update the patch in a bit. I do not have the hardware but let me
know if I can help you in testing.

Thanks,
Hiren

>
> After doing some code sperlunking, looks like this bug was introduced
> w/ the original driver 15 years ago...  And no one noticed even after
> moving the code around a few times...
>
> --
>   John-Mark Gurney                              Voice: +1 415 225 5579
>
>      "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALCpEUFKmpBGFvMzLUpB-6tXKL0GDwQ7kxiGb6GSf4SoMt-haA>