Skip to content

V8 warning propagation #33

Description

@CedricGuillemet

V8 headers have some unused parameters

v8.h:599:54: error: unused parameter 'source' [-Werror,-Wunused-parameter]
    V8_INLINE static void Copy(const Persistent<S, M>& source,

Because of how it's included in env.h


Any project needing env.h with V8 will have build errors because of warnings_as_error CMake macro.
This didn't happen before because of the use of template (I think)
So, for (many) dependent project, a check is needed that looks like this in cmake:

# V8 and V8Inspector have unused parameters. Unable to set warning as error.
if(NOT NAPI_JAVASCRIPT_ENGINE STREQUAL "V8")
    warnings_as_errors(NativeOptimizations)
endif()

Is there a way to get more recent v8.h with fixed warning? Is it possible to remove v8.h to be included in env.h? Is it better to move that V8 check into warnings_as_errors CMake function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions