On 26 October 2013 00:47, Timothy Arceri <t_arc...@yahoo.com.au> wrote:
> On Fri, 2013-10-25 at 14:51 -0700, Paul Berry wrote: > > > + _mesa_glsl_error(&loc, state, > > + is_initializer ? "initializer" : "value" > > + " of type %s cannot be assigned to " > > + "variable of type %s", > > + rhs->type->name, lhs_type->name); > > + > > > > > > This doesn't produce the output you want. String concatenation happens > at compile time and takes precedence over everything else, so this is being > interpreted as: > > > > > > _mesa_glsl_error(&loc, state, is_initializer ? "initializer" : "value of > type %s cannot be assigned to variable of type %s", rhs->type->name, > lhs_type->name); > > > > > > Adding parenthesis doesn't help because string concatenation only works > on string literals. I believe what you actually want is: > > > > _mesa_glsl_error(&loc, state, > > "%s of type %s cannot be assigned to " > > "variable of type %s", > > is_initializer ? "initializer" : "value", > > rhs->type->name, lhs_type->name); > > > > Yes that makes sense thanks. > > >With that change, this patch is: > > > > > > Reviewed-by: Paul Berry <stereotype...@gmail.com> > > > > > > Do you have push access? I can push the patch for you (with this > change) if you'd like. > > > > No I don't have push access. Would be great if you could push this with > the change. > > Thanks for the review. > > Tim > Ok, I've pushed it upstream.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev