class AdLint::Exam::CBuiltin::W0638

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 14991
def initialize(phase_ctxt)
  super
  interp = phase_ctxt[:cc1_interpreter]
  interp.on_function_call_expr_evaled += T(:check)
end

Private Instance Methods

check(funcall_expr, fun, *) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 14998
def check(funcall_expr, fun, *)
  if fun.named? && fun.name =~ /\A.*printf\z/
    if funcall_expr.argument_expressions.empty?
      W(funcall_expr.location)
    end
  end
end