[Mesa-dev] nir warnings
Matt Turner
mattst88 at gmail.com
Tue Feb 10 11:19:16 PST 2015
On Tue, Feb 10, 2015 at 11:15 AM, Brian Paul <brianp at vmware.com> wrote:
> There's a number of new compiler warnings (gcc 4.8.2) in the nir code:
I'm glad I'm not the only one annoyed by new warnings.
> nir/glsl_to_nir.cpp: In member function 'virtual void
> {anonymous}::nir_visitor::visit(ir_call*)':
> nir/glsl_to_nir.cpp:610:73: warning: 'op' may be used uninitialized in this
> function [-Wmaybe-uninitialized]
> nir_intrinsic_instr *instr = nir_intrinsic_instr_create(shader, op);
This needs an assert(0) replaced with unreachable(). I'll send that.
> nir/nir_lower_phis_to_scalar.c: In function 'is_phi_src_scalarizable':
> nir/nir_lower_phis_to_scalar.c:70:14: warning: 'or' of unmatched not-equal
> tests is always 1 [enabled by default]
> src_alu->op != nir_op_vec4;
> ^
There is a patch for this sent yesterday.
> nir/nir_lower_samplers.cpp: In function 'void lower_sampler(nir_tex_instr*,
> gl_shader_program*, const gl_program*, void*)':
> nir/nir_lower_samplers.cpp:72:9: warning: unused variable 'has_indirect'
> [-Wunused-variable]
> bool has_indirect = false;
> ^
This variable looks useless (looks like work-in-progress code). I'll
send a patch to kill it too.
More information about the mesa-dev
mailing list