[squid-dev] [PATCH] Coverity-fixes, part 1: EnumIterator

Kinkie gkinkie at gmail.com
Sat Aug 29 21:12:08 UTC 2015


On Fri, Aug 28, 2015 at 3:02 AM, Alex Rousskov <
rousskov at measurement-factory.com> wrote:

> On 08/27/2015 03:04 AM, Kinkie wrote:
>
> >     >     >> + *   zeroth, first, second, onePastLast, fourth
> >     >     Please make onePastLast last.
> >
> >
> >     > I'm trying to highlight the fact that
> >     > the dereferencing will only happen on EnumType::first and
> >     > EnumType::second. Any suggestion on how to clearly express it is
> welcome.
> >
> >     1. Replace the current enum values with five color names: white,
> blue,
> >     red, orange, pink.
> >
> >     2. Iterate from blue to orange.
> >
> >     3. Add a do_stuff(v) call comment saying that it will be called with
> red
> >     and blue values only.
>
>
> > Done
>
>
> Not as far as I can see:
>
>
> > + * Typical use:
> > + * \code
> > + * enum class EnumType {
> > + *   zeroth, first, second, onePastLast, fourth
> > + * };
>

Aha! Found out what the issue was: I had misunderstood where you wanted
this done, and I had done it in the wrong place.
Now fixed in the attached patch (in two parts: Makefile.am and everything
else).

Kinkie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150829/0ccb6f65/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coverity-fixes-enumiterator-v3p1.patch
Type: application/octet-stream
Size: 28225 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150829/0ccb6f65/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coverity-fixes-enumiterator-v3p2.patch
Type: application/octet-stream
Size: 933 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150829/0ccb6f65/attachment-0003.obj>


More information about the squid-dev mailing list