Skip to content

Conversation

fzakaria
Copy link
Contributor

@fzakaria fzakaria commented Oct 5, 2025

Motivation

Let's get clang-tidy to be clean!

> clang-tidy src/libstore/build/derivation-check.cc -p build
>  echo $status
0

Context

../src/libstore/build/derivation-check.cc:85:35: warning: Dereference of undefined pointer value [clang-analyzer-core.NullDereference]
   85 |             if (checks.maxSize && info.narSize > *checks.maxSize)
../src/libstore/build/derivation-check.cc:117:31: warning: 4th function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
  117 |                         throw BuildError(
../src/libstore/build/derivation-check.cc:181:45: warning: 2nd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
  181 |                     if (auto outputChecks = get(checksPerOutput, outputName))

I'm not sure why but moving away from the destructing let clang-tidy follow the initialization properly.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@fzakaria fzakaria requested a review from Ericson2314 as a code owner October 5, 2025 18:19
@edolstra edolstra merged commit e5ae81c into NixOS:master Oct 6, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants