Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-08-11 Thread Spencer Oliver
On 11/08/2011 22:14, Jie Zhang wrote: Anyone having a go at this - if not i may get a chance later on in the week? Cheers Spen I have merged a patch that should sort all these warnings out. Thanks. But it's on your git tree, not on the public one, right? it has been merged to openocd mas

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-08-11 Thread Jie Zhang
On Thu, Aug 11, 2011 at 4:47 PM, Spencer Oliver wrote: > On 01/08/2011 10:05, Spencer Oliver wrote: >> >> On 29 July 2011 22:23, Andreas Fritiofson >>  wrote: Another fix would be not trying to print the status as a numeric value. We can print it as an error message, so we don't nee

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-08-11 Thread Spencer Oliver
On 01/08/2011 10:05, Spencer Oliver wrote: On 29 July 2011 22:23, Andreas Fritiofson wrote: Another fix would be not trying to print the status as a numeric value. We can print it as an error message, so we don't need to handle this tricky situation. Like LOG_ERROR("FT_Write fai

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-08-01 Thread Jie Zhang
On Mon, Aug 1, 2011 at 5:05 AM, Spencer Oliver wrote: > On 29 July 2011 22:23, Andreas Fritiofson > wrote: >>> Another fix would be not trying to print the status as a numeric >>> value. We can print it as an error message, so we don't need to handle >>> this tricky situation. Like >>> >>>      

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-08-01 Thread Spencer Oliver
On 29 July 2011 22:23, Andreas Fritiofson wrote: >> Another fix would be not trying to print the status as a numeric >> value. We can print it as an error message, so we don't need to handle >> this tricky situation. Like >> >>               LOG_ERROR("FT_Write failed:%s\n", >> ftd2xx_status_strin

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-07-29 Thread Andreas Fritiofson
On Fri, Jul 29, 2011 at 6:24 PM, Jie Zhang wrote: > On Fri, Jun 24, 2011 at 3:14 PM, Jie Zhang wrote: > > On Mon, Jun 20, 2011 at 6:50 AM, Steve Bennett > wrote: > >> The default is -Werror, so warnings become errors > >> and stop the build. > >> Might be better to simply #define FT_STATUS inst

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-07-29 Thread Jie Zhang
On Fri, Jun 24, 2011 at 3:14 PM, Jie Zhang wrote: > On Mon, Jun 20, 2011 at 6:50 AM, Steve Bennett wrote: >> The default is -Werror, so warnings become errors >> and stop the build. >> Might be better to simply #define FT_STATUS instead. >> >> -               LOG_ERROR("FT_Write returned: %lu", s

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-07-29 Thread Jie Zhang
On Thu, Jun 23, 2011 at 5:43 PM, Steve Bennett wrote: > Then perhaps this is what you are after. > I'm not sure if it is any more correct, since FT_STATUS > is ULONG which is unsigned int (!), not uint32_t > I happened to find a slightly revised version of this patch was merged recently. But it wi

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-24 Thread Jie Zhang
On Mon, Jun 20, 2011 at 6:50 AM, Steve Bennett wrote: > The default is -Werror, so warnings become errors > and stop the build. > Might be better to simply #define FT_STATUS instead. > > -               LOG_ERROR("FT_Write returned: %lu", status); > +               LOG_ERROR("FT_Write returned: %l

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-24 Thread Sergey Lapin
On Fri, Jun 24, 2011 at 1:03 PM, Øyvind Harboe wrote: > The patch fails. > > Could you rebase and repost? > I think the whole idea is fail. This patch adds more problems than it fixes. What size of unsigned long is on amd64 or ppc64? PRIx macros are for fixed-width types, like int32_t. Unsigned lo

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-24 Thread Øyvind Harboe
The patch fails. Could you rebase and repost? -- Øyvind Harboe - Can Zylin Consulting help on your project? US toll free 1-866-980-3434 / International +47 51 87 40 27 http://www.zylin.com/ ___ Openocd-development mailing list Openocd-development@lis

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-23 Thread Steve Bennett
On 24/06/2011, at 2:04 AM, Michael Schwingen wrote: > On 23.06.2011 14:39, Laurent Gauch wrote: >>> />>/ I don't see how. >>> />/ />/ I haven't followed this(big discussions), but I've seen on the >>> list >>> />/ in the past that casting is frowned upon and using these >>> />/ macros is cheered..

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-23 Thread Michael Schwingen
On 23.06.2011 14:39, Laurent Gauch wrote: />>/ I don't see how. />/ />/ I haven't followed this(big discussions), but I've seen on the list />/ in the past that casting is frowned upon and using these />/ macros is cheered... Anyway... I'm happy to follow the path />/ of using these macros, I cer

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-23 Thread Sergey Lapin
On Thu, Jun 23, 2011 at 4:39 PM, Laurent Gauch wrote: >> >/ On Thu, Jun 23, 2011 at 1:03 PM, Steve Bennett > > workware.net.au >> > > wrote: >> />>/ On 23/06/2011, at 8:59 PM, Øyvind Harboe wrote: >> />>/ />>>/ I don't think this is su

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-23 Thread Laurent Gauch
>/ On Thu, Jun 23, 2011 at 1:03 PM, Steve Bennett https://lists.berlios.de/mailman/listinfo/openocd-development>> wrote: />>/ On 23/06/2011, at 8:59 PM, Øyvind Harboe wrote: />>/ />>>/ I don't think this is sufficient, as it will put up warnings on some />>>/ other platforms unless you use the m

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-23 Thread Øyvind Harboe
> I guess I'm not quite sure what you want. > Feel free to apply a modified patch if you want, > as long as it removes the warnings. I think the correct thing to apply would be a patch that uses the PRIx32 macros(or whichever flavor is correct in this case), as the patch stands, I don't think it m

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-23 Thread Steve Bennett
On 23/06/2011, at 9:21 PM, Øyvind Harboe wrote: > On Thu, Jun 23, 2011 at 1:03 PM, Steve Bennett wrote: >> On 23/06/2011, at 8:59 PM, Øyvind Harboe wrote: >> >>> I don't think this is sufficient, as it will put up warnings on some >>> other platforms unless you use the macros that expand to the

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-23 Thread Øyvind Harboe
On Thu, Jun 23, 2011 at 1:03 PM, Steve Bennett wrote: > On 23/06/2011, at 8:59 PM, Øyvind Harboe wrote: > >> I don't think this is sufficient, as it will put up warnings on some >> other platforms unless you use the macros that expand to the >> correct formatting string. >> >> See C99 section: >>

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-23 Thread Steve Bennett
On 23/06/2011, at 8:59 PM, Øyvind Harboe wrote: > I don't think this is sufficient, as it will put up warnings on some > other platforms unless you use the macros that expand to the > correct formatting string. > > See C99 section: > > http://en.wikipedia.org/wiki/Printf Can you provide an exam

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-23 Thread Øyvind Harboe
I don't think this is sufficient, as it will put up warnings on some other platforms unless you use the macros that expand to the correct formatting string. See C99 section: http://en.wikipedia.org/wiki/Printf -- Øyvind Harboe - Can Zylin Consulting help on your project? US toll free 1-866-980-

[Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-06-20 Thread Steve Bennett
The default is -Werror, so warnings become errors and stop the build. Might be better to simply #define FT_STATUS instead. Signed-off-by: Steve Bennett --- src/jtag/drivers/ft2232.c | 88 ++-- 1 files changed, 44 insertions(+), 44 deletions(-) diff --gi