Csound Csound-dev Csound-tekno Search About

[Cs-dev] Odd code in rtjack

Date2013-10-18 13:46
Fromjohn ffitch
Subject[Cs-dev] Odd code in rtjack
AttachmentsNone  None  
or broken code?

/home/jpff/Sourceforge/csound/New/csound6/InOut/rtjack.c: In function ‘openJackStreams’:
/home/jpff/Sourceforge/csound/New/csound6/InOut/rtjack.c:504:11: warning: the address of ‘dev’ will always evaluate as ‘true’ [-Waddress]
/home/jpff/Sourceforge/csound/New/csound6/InOut/rtjack.c:534:11: warning: the address of ‘dev’ will always evaluate as ‘true’ [-Waddress]

relevant lines are

      char dev[128], *dev_final, *sp;
...
      if (dev) {
        dev_final = dev;
...
      if (dev) {
        dev_final = dev;


dev can never be false so the code is at best misleading

==John ffitch


Date2013-10-18 14:25
FromVictor Lazzarini
SubjectRe: [Cs-dev] Odd code in rtjack
Looks like broken code.
On 18 Oct 2013, at 13:46, john ffitch  wrote:

> or broken code?
> 
> /home/jpff/Sourceforge/csound/New/csound6/InOut/rtjack.c: In function ‘openJackStreams’:
> /home/jpff/Sourceforge/csound/New/csound6/InOut/rtjack.c:504:11: warning: the address of ‘dev’ will always evaluate as ‘true’ [-Waddress]
> /home/jpff/Sourceforge/csound/New/csound6/InOut/rtjack.c:534:11: warning: the address of ‘dev’ will always evaluate as ‘true’ [-Waddress]
> 
> relevant lines are
> 
>      char dev[128], *dev_final, *sp;
> ...
>      if (dev) {
>        dev_final = dev;
> ...
>      if (dev) {
>        dev_final = dev;
> 
> 
> dev can never be false so the code is at best misleading
> 
> ==John ffitch
> 
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net