class AdLint::Exam::CBuiltin::W0021
Public Class Methods
new(phase_ctxt)
click to toggle source
Calls superclass method
AdLint::Examination::new
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 404 def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check_explicit_conversion) end
Private Instance Methods
check_explicit_conversion(expr, orig_var, rslt_var)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 411 def check_explicit_conversion(expr, orig_var, rslt_var) orig_type = orig_var.type rslt_type = rslt_var.type if orig_type.pointer? && orig_type.unqualify.base_type.volatile? && rslt_type.pointer? && !rslt_type.unqualify.base_type.volatile? W(expr.location) end end