Tom,

Some of these format specifier changes don't look right.  Note that our bu_*() 
functions implement additional print specifiers.  If you're making your way 
through compiler warnings, they'll probably give you false-positive results.

In the commit below, %V should be a bu_vls pointer.  In others, %z is provided 
by our for size_t.
In particular for %V, passing a bu_vls_addr() should result in a crash or 
corruption.

Cheers!
Sean


On Oct 18, 2013, at 10:03 AM, [email protected] wrote:

> Revision: 58207
>          http://sourceforge.net/p/brlcad/code/58207
> Author:   tbrowder2
> Date:     2013-10-18 14:03:33 +0000 (Fri, 18 Oct 2013)
> Log Message:
> -----------
> correct print format errors
> 
> Modified Paths:
> --------------
>    brlcad/trunk/src/libtclcad/tclcad_obj.c
> 
> Modified: brlcad/trunk/src/libtclcad/tclcad_obj.c
> ===================================================================
> --- brlcad/trunk/src/libtclcad/tclcad_obj.c   2013-10-18 14:01:42 UTC (rev 
> 58206)
> +++ brlcad/trunk/src/libtclcad/tclcad_obj.c   2013-10-18 14:03:33 UTC (rev 
> 58207)
> @@ -1868,7 +1868,7 @@
> 
>     if (BU_STR_EQUAL(argv[2], "tick_interval")) {
>       if (argc == 3) {
> -         bu_vls_printf(gedp->ged_result_str, "%d", gasp->gas_tick_interval);
> +         bu_vls_printf(gedp->ged_result_str, "%f", gasp->gas_tick_interval);
>           return GED_OK;
>       }
> 
> @@ -3172,7 +3172,7 @@
> 
>     if (BU_STR_EQUAL(argv[2], "size")) {
>       if (argc == 3) {
> -         bu_vls_printf(gedp->ged_result_str, "%lf", gdlsp->gdls_size);
> +         bu_vls_printf(gedp->ged_result_str, "%d", gdlsp->gdls_size);
>           return GED_OK;
>       }
> 
> @@ -9130,8 +9130,8 @@
> 
>     bu_vls_printf(&bindings, "bind %V <Motion> {%V mouse_move_arb_edge %V %s 
> %s %%x %%y}",
>                 &gdvp->gdv_dmp->dm_pathName,
> -               &current_top->to_gop->go_name,
> -               &gdvp->gdv_name,
> +               bu_vls_addr(&current_top->to_gop->go_name),
> +               bu_vls_addr(&gdvp->gdv_name),
>                 argv[2],
>                 argv[3]);
>     Tcl_Eval(current_top->to_interp, bu_vls_addr(&bindings));
> 
> This was sent by the SourceForge.net collaborative development platform, the 
> world's largest Open Source development site.
> 
> 
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
> _______________________________________________
> BRL-CAD Source Commits mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/brlcad-commits


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to