Skip to content

Node 8: Compiler warning about invalid format passed to fprintf when building in VS 2015 #13463

@KobyBo

Description

@KobyBo
  • Version: 8.0.0
  • Platform: Visual Studio 2015 (Update 3) on Windows 10
  • Subsystem: Win32 (x86)
  • Using the sln and vcxproj files generated by running "vcbuild.bat x86 release".

Hi
While compiling node v8 (using sources downloaded yesterday) on VS 2015 (Update 3), I've noticed I'm receiving the following compiler warnings:

warning C4476: 'fprintf' : unknown type field character ''' in format specifier
warning C4474: 'fprintf' : too many arguments passed for format string

about the following line in env-inl.h (got the warnings repeatedly, for each cpp which includes env-inl.h):

inline bool Environment::AsyncHooks::pop_ids(double async_id) {
...
    fprintf(stderr,
              "Error: async hook stack has become corrupted ("
              "actual: %'.f, expected: %'.f)\n",
               uid_fields_[kCurrentAsyncId],
               async_id);
..,

The "%'.f" format doesn't seem right (or I'm missing something).

Metadata

Metadata

Assignees

No one assigned

    Labels

    async_hooksIssues and PRs related to the async hooks subsystem.c++Issues and PRs that require attention from people who are familiar with C++.confirmed-bugIssues with confirmed bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions