Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#1705·jsoncpp

Missing prototype for function added in 1.9.8

Author: rpavlikCreated Jul 7, 2026Updated Jul 7, 2026

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

Source: open-source-parsers/jsoncpp

View original on GitHubView discussion on GitHub