Re: Ardour contributions ( was: Level needed ... )

Robin Gareus <[email protected]>
Newsgroups gmane.comp.audio.ardour.user
Message-ID <[email protected]>
On 03/02/2018 03:22 PM, Chris Caudle wrote:
> On Fri, March 2, 2018 8:11 am, Ben Loftis wrote:
>> ....more ideas welcome!
> 
> Is there any interest in minor changes that (probably) don't have any
> effect on functionality?

Yes there is! That is a very good suggestions, too.

Also code-indent (effective NO-OP) formatting according to
  https://ardour.org/styleguide.html


> I see pages of warnings like this when building:
> ../gtk2_ardour/ardour_ui_dialogs.cc:439:33: warning: missed loop
> optimization, the loop counter may overflow [-Wunsafe-loop-optimizations]
>   for (i = candidates.begin(); i != candidates.end(); ++i) {
>                                ~~^~~~~~~~~~~~~~~~~~~

Except this warning in particular is not a good example.
gcc, right? Which version are you using?


> Not a big deal, but at one point I was habituated to make sure code
> compiled without warnings 

I assume you have configured Ardour with  `--optimize --strict`.
--strict explicitly asks for `-Wunsafe-loop-optimizations -pedantic`.

Here it produces thousands of "cannot optimize loop" messages with gcc-4
and a few hundred with gcc-5 and fifty-something with gcc-7.

At least gcc's loop-optimizer is improving :)


> both to make sure any real logic errors did not slip through,

We try hard, and fix relevant warnings, but it's unlikely to ever be
100% warning-clean. In particular with "-pedantic". Also some warnings
come from header-includes and are different depending on compiler and
compiler-version.

> and also to make sure the compiler was able to optimize
> fully. 

good luck with that :)

The loop in this case is over a STL container, a std::vector<>,  and not
under our control.

Besides one-off GUI code (triggered when you press ctrl+page-up/down).
There's no need to optimize it.

Now, fixing some of the static-analysis issues would be nice:
https://nightly.ardour.org/list.php#clang_analyzer
(except a lot of them are false-positives)


2c,
robin

_______________________________________________
Ardour-Users mailing list
[email protected]
To unsubscribe  or change your mailing preferences please visit:
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.