Skip to content

Fix MSVC C4702 warnings in trie index factory - #15090

Open
jeongseok-meta wants to merge 1 commit into
facebook:mainfrom
jeongseok-meta:fix-msvc-c4702-trie-index
Open

Fix MSVC C4702 warnings in trie index factory#15090
jeongseok-meta wants to merge 1 commit into
facebook:mainfrom
jeongseok-meta:fix-msvc-c4702-trie-index

Conversation

@jeongseok-meta

Copy link
Copy Markdown

Summary

Remove the two return nullptr statements that follow unconditional abort() calls in the deprecated TrieIndexFactory overloads.

Why

These overloads are intentionally non-returning, as documented by their existing comments. MSVC diagnoses each trailing return as unreachable code (C4702), which breaks Windows builds when warnings are treated as errors. Since abort() is non-returning, deleting the unreachable statements preserves the intended behavior and keeps warning-as-error coverage intact.

This was found while packaging RocksDB 11.8.1 for conda-forge. I searched the current RocksDB issues and pull requests for C4702, unreachable-code, and trie-index fixes and found no existing report or patch; current main still contains both returns.

Validation

  • the complete conda-forge RocksDB 11.8.1 matrix passed with this patch, including the native Windows build
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant