Skip to content

Warning about unused parameter 'node' in 'get_argument_vector' function #183

@mtiapko

Description

@mtiapko

Hi!

I'm getting warnings about unused parameter 'node' in this function:

Arguments get_argument_vector(size_t N, const AstNode& node) {

Function get_arguments uses node parameter to throw exception. So I don't know if it is right to remove node parameter from get_argument_vector function, or it is better to add a similar check as in get_arguments function:

std::array<const json*, N> get_arguments(const AstNode& node) {
if (json_eval_stack.size() < N) {
throw_renderer_error("function needs " + std::to_string(N) + " variables, but has only found " + std::to_string(json_eval_stack.size()), node);
}

Compiling using g++ 10.2.0 with -Wall -Wextra flags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions