Skip to content

Missing prototype for function added in 1.9.8 #1705

Description

@rpavlik

Describe the bug
When I imported this into the OpenXR SDK repo to update, our stricter compile flags caught a missing prototype.

../src/external/jsoncpp/src/lib_json/json_reader.cpp:984:18: error: no previous prototype for function 'newlineScanByteCountForTesting' [-Werror,-Wmissing-prototypes]
JSON_API size_t& newlineScanByteCountForTesting() {
                 ^
../src/external/jsoncpp/src/lib_json/json_reader.cpp:984:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
JSON_API size_t& newlineScanByteCountForTesting() {
         ^
         static 

I understand this is not intended to be public API. I think a prototype directly above it would satisfy the warning.

To Reproduce
Steps to reproduce the behavior:

  1. Build with clang-10 (or newer) and -Werror,-Wmissing-prototypes

Expected behavior
For this to build as a drop in replacement for the previous version.

Desktop (please complete the following information):

  • OS: Linux
  • Meson version: n/a, submodule, using CMake
  • Ninja version: not sure but old and not really relevant. Build image is khronosgroup/docker-images:openxr-sdk.20250603@sha256:81a18d30b202bbc2f8ce0cd579991fe6cb235eb3c2045e94a12fa5a4d5b17882

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