Re: [PATCH 4/7] Protect 'i' in |_handle_inotify_watch| by DBUS_ENABLE_VERBOSE_MODE

Simon McVittie <simon.mcvittie-ZGY8ohtN/[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Organization Collabora Ltd.
Message-ID <[email protected]>
On 09/08/16 20:18, Thomas Zimmermann wrote:
>  #ifdef DBUS_ENABLE_VERBOSE_MODE
> -  while (i < ret)
> -    {
> -      struct inotify_event *ev;
> +  {
> +    int i = 0;

This is a pretty huge diffstat because you've re-indented everything.
I'd prefer to either wrap a separate #ifdef DBUS_ENABLE_VERBOSE_MODE
around the existing declaration of i, or make disabled verbose mode add
"unused-variable" to DISABLE_UNUSED_WARNINGS in configure.ac (look for
"test x$enable_checks = xno" at around line 321).

Any time a trivial fix causes a non-trivial diff, IMO it's worth
considering whether the fix is worth the diff.

-- 
Simon McVittie
Collabora Ltd. <http://www.collabora.com/>
_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
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.