Plot details - barchart reports

Davide Imbeni davide.imbeni at gmail.com
Tue Feb 12 12:10:46 EST 2008


Interesting.

I actually got the warnings, but I'm forced to run configure with the
flag --disable-error-on-warning, so I could compile even though.

But your point makes me wonder about one thing:

As I understand, you get errors with the statement:

    GogObject *object = gog_object_get_child_by_role (...);

but not when you correct it as follows:

   GogObject *object;
   object = gog_object_get_child_by_role (...);

Now my question is, why don't you get the same error in the (very
similar) statement about rotate_row_labels that comes right before?

  if (rotate_row_labels) {
    GogObject *object = gog_object_get_child_by_role (
      chart, gog_object_find_role_by_name (chart, "X-Axis"));
    style = gog_styled_object_get_style (GOG_STYLED_OBJECT (object));
    gog_style_set_text_angle (style, 90.0);
  }

It looks like the very same statement to me (I actually copied it
without understanding too much... :-( )
What am I missing?


On Feb 12, 2008 4:50 PM, Timothy Janssen <tjanssen at gmail.com> wrote:
>
> Davide Imbeni wrote:
> > Hi again,
> >
> > I apologize for doing this twice.
> > I found no good reason not to have the same "gridline" option for
> > net-barchart.scm. Please find attached the new diff file.
> >
> > Best Regards
> >
> > Davide
>
> I get a compile error when I try to compile the source code with this
> patch applied:
>
> cc1: warnings being treated as errors
> gnc-html-graph-gog.c: In function 'handle_barchart':
> gnc-html-graph-gog.c:516: warning: ISO C90 forbids mixed declarations
> and code
>
>
> I moved the declaration to the top of the function and it compiles now.
>
> Attached is Davide's diff file with my change.
>
> Tim
>


More information about the gnucash-devel mailing list