Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Carsten Breuer
Hi David, hi all, first of all i have to say that it was not my intention to upset the developers here. Sorry. I was very happy that you fix the R13_svc bug in the second i had report it.. >> I agree. Nonetheless this error shouldn't occur in the official >> snapshot on the website. > I must hav

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Øyvind Harboe
Can you find an example of a bug amongst these warnings? Or perhaps rate the top 5 most interesting findings? In Eclipse for Java there is something called a "quickfix" where you can tell the editor to fix a warning/error. Would be nice to have the same for C, e.g.: > [./src/jtag/vsllink.c:958]

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Benjamin Schmidt
Not sure if interesting to anyone, but I just ran svn head againt cppcheck... this is the result: [./contrib/libdcc/dcc_stdio.c:156]: (style) Warning - using char variable in bit operation [./src/flash/aduc702x.c:140]: (style) The scope of the variable x can be limited [./src/flash/aduc702x.c:1

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread David Brownell
On Sunday 13 December 2009, Carsten Breuer wrote: > What I dislike most: > > Missing brackets: > > if (FOO_BAR) >     do_something > > It should be > > if (FOO_BAR) > { >     do:something > } For the record: I dislike the superfluous brackets. As Lennart noted, wasting vertical space is not

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread David Brownell
On Sunday 13 December 2009, Carsten Breuer wrote: > I agree. Nonetheless this error shouldn't occur in the official > snapshot on the website. I must have missed the notice that *during the merge window* it became reasonable to treat arbitrary snapshots as being release quality. Could you point o

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Lennert Buytenhek
On Sun, Dec 13, 2009 at 10:29:36PM +0100, Carsten Breuer wrote: > > You could also argue that the do_something definition is buggy, > > since it's not one statement. > > Correct. But if you use brackets the code do what you want and > you get the result what you expect. Sure, but if you use brac

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Carsten Breuer
> You could also argue that the do_something definition is buggy, > since it's not one statement. Correct. But if you use brackets the code do what you want and you get the result what you expect. Lint complains about both. > E.g. the Linux kernel takes this stance, and wraps such macros in do >

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Lennert Buytenhek
On Sun, Dec 13, 2009 at 09:53:42PM +0100, Carsten Breuer wrote: > What I dislike most: > > Missing brackets: > > if (FOO_BAR) > do_something > > It should be > > if (FOO_BAR) > { > do:something > } > > because if do_something is defined like follows: > > #define do_something a=10; b

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Carsten Breuer
> -Wall is the minimum that should be applied to source code. Running > it through Splint (or some other verification tool) would not hurt > either. That's true. Nonetheless some people are too lazy to make a distclean first ;-). Splint is t buggy to use it. At work we use pclint from gimple w

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Carsten Breuer
Hi, > This is a good thing to have as a default behavior, we want warning > fixes fed back. It cleans up the code and finds real bugs. I agree. Nonetheless this error shouldn't occur in the official snapshot on the website. > You *can* disable error on warnings at configure time. I prefered too

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Dean Glazeski
their cvs has been updated according to sourceforge somewhat recently. they haven't done a release in two years, though. On 12/13/09, Albert ARIBAUD wrote: > Øyvind Harboe a écrit : >> On Sun, Dec 13, 2009 at 3:04 PM, Albert ARIBAUD >> wrote: >>> Øyvind Harboe a écrit : >>> > -Wall is the m

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Albert ARIBAUD
Albert ARIBAUD a écrit : > Also note splint has not been updated for a long time, as I discovered > when going to its home site. There are some alternatives mentioned on Wikipedia: I like clang's way of reporting errors, a

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Albert ARIBAUD
Øyvind Harboe a écrit : > On Sun, Dec 13, 2009 at 3:04 PM, Albert ARIBAUD > wrote: >> Øyvind Harboe a écrit : >> -Wall is the minimum that should be applied to source code. Running it through Splint (or some other verification tool) would not hurt either. >>> Is there an open source lin

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Øyvind Harboe
On Sun, Dec 13, 2009 at 3:04 PM, Albert ARIBAUD wrote: > Øyvind Harboe a écrit : > >>> -Wall is the minimum that should be applied to source code. Running it >>> through Splint (or some other verification tool) would not hurt either. >> >> Is there an open source lint tool that's worthwhile to use

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Albert ARIBAUD
Øyvind Harboe a écrit : >> -Wall is the minimum that should be applied to source code. Running it >> through Splint (or some other verification tool) would not hurt either. > > Is there an open source lint tool that's worthwhile to use? > > Did you try splint on OpenOCD? Apart from Splint, I ha

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Øyvind Harboe
On Sun, Dec 13, 2009 at 2:45 PM, Albert ARIBAUD wrote: > Øyvind Harboe a écrit : >> >> On Sun, Dec 13, 2009 at 12:13 AM, Carsten Breuer >> wrote: >>> >>> Hi all, >>> >>> >>> "treat warning as errors" (-wall) is a fine thing but sometimes breaks >>> the build.. >> >> This is a good thing to have a

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Albert ARIBAUD
Øyvind Harboe a écrit : > On Sun, Dec 13, 2009 at 12:13 AM, Carsten Breuer > wrote: >> Hi all, >> >> >> "treat warning as errors" (-wall) is a fine thing but sometimes breaks >> the build.. > > This is a good thing to have as a default behavior, we want warning > fixes fed back. It cleans up the

Re: [Openocd-development] OpenOCD broken

2009-12-13 Thread Øyvind Harboe
On Sun, Dec 13, 2009 at 12:13 AM, Carsten Breuer wrote: > Hi all, > > > "treat warning as errors" (-wall) is a fine thing but sometimes breaks > the build.. This is a good thing to have as a default behavior, we want warning fixes fed back. It cleans up the code and finds real bugs. You *can* di

Re: [Openocd-development] OpenOCD broken

2009-12-12 Thread David Brownell
On Saturday 12 December 2009, Carsten Breuer wrote: > "treat warning as errors" (-wall) is a fine thing but sometimes breaks > the build.. In my last git pull i get an error in > src/flash/nor/stellaris.c, line 644: > > LOG_DEBUG("FMPPE%d = %#8.8x (status %d)", i, lockbits, status); Should have b

[Openocd-development] OpenOCD broken

2009-12-12 Thread Carsten Breuer
Hi all, "treat warning as errors" (-wall) is a fine thing but sometimes breaks the build.. In my last git pull i get an error in src/flash/nor/stellaris.c, line 644: LOG_DEBUG("FMPPE%d = %#8.8x (status %d)", i, lockbits, status); This is the same with the official download snapshot i have downl