On Thu, Sep 12, 2002 at 11:59:35PM +0100, Philip Martin wrote:
> "D. J. Hagberg" <dh114027@central.sun.com> writes:
>
> > Index: subversion/tests/libsvn_fs/fs-test.c
> > ===================================================================
> > --- subversion/tests/libsvn_fs/fs-test.c
> > +++ subversion/tests/libsvn_fs/fs-test.c Mon Sep 9 13:38:01 2002
> > @@ -5167,18 +5167,18 @@
> > {
> > for (j = 0; j < 16; j++)
> > {
> > - struct path_rev_t pr1 = path_revs[i];
> > - struct path_rev_t pr2 = path_revs[j];
> > + struct path_rev_t *pr1 = &(path_revs[i]);
> > + struct path_rev_t *pr2 = &(path_revs[j]);
>
> Out of interest, does using const
>
> > + const struct path_rev_t pr1 = path_revs[i];
> > + const struct path_rev_t pr2 = path_revs[j];
>
> work?
Nope.
What does work is removing the const from the rev field in
path_rev_t. I'll commit that and if anyone has anything better,
let me know first and I'll try it out with forte. It doesn't
seem to produce a warning with gcc (on Darwin), and it's a much
easier solution than D.J.'s original suggestion.
For more on non-modifiable lvalues:
http://www.embedded.com/story/OEG20010618S0075
Based on my reading of that, it seems that forte *is* correct on
producing this warning. But, I could be wrong and we need to submit
a bug report to Sun.
Non-compilable code is a sure way to make me not happy. -- justin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 19 10:57:15 2002