Skip to content

Initialize a few uninitialized variables

Johannes Schindelin via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4cat_one_file(): make it easy to see that the `size` variable is initializedbuiltin/cat-file.c+1 -11 reply
2/4fsck: avoid using an uninitialized variablefsck.c+1 -11 reply
3/4load_revindex_from_disk(): avoid accessing uninitialized datapack-revindex.c+1 -11 reply
4/4load_pack_mtimes_file(): avoid accessing uninitialized datapack-mtimes.c+1 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Initialize a few uninitialized variables

When I ran CodeQL on Git's source code, it said that that variables might be uninitialized in a few places.

Johannes Schindelin (4):
cat_one_file(): make it easy to see that the size variable is
initialized
fsck: avoid using an uninitialized variable load_revindex_from_disk(): avoid accessing uninitialized data load_pack_mtimes_file(): avoid accessing uninitialized data

 builtin/cat-file.c | 2 +-
 fsck.c             | 2 +-
 pack-mtimes.c      | 2 +-
 pack-revindex.c    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

base-commit: 683c54c999c301c2cd6f715c411407c413b1d84e
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1888%2Fdscho%2Funinitialized-variables-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1888/dscho/uninitialized-variables-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1888

Signature · 1 line
gitgitgadget