summaryrefslogtreecommitdiff
path: root/git-rebase--am.sh
diff options
context:
space:
mode:
authorDavid Barr <davidbarr@google.com>2012-05-31 14:41:25 (GMT)
committerJonathan Nieder <jrnieder@gmail.com>2012-07-06 04:26:52 (GMT)
commit4a5de8dd79879d737e172a5d7e4196c6bf99e57d (patch)
tree65b4d4b22c8893fb7808a72b9c2f37b0b8273bc9 /git-rebase--am.sh
parent3b8a3051733e754dad587e5a73fba7f367c7e0db (diff)
downloadgit-4a5de8dd79879d737e172a5d7e4196c6bf99e57d.zip
git-4a5de8dd79879d737e172a5d7e4196c6bf99e57d.tar.gz
git-4a5de8dd79879d737e172a5d7e4196c6bf99e57d.tar.bz2
vcs-svn: avoid self-assignment in dummy initialization of pre_off
Without this change, clang complains: vcs-svn/svndiff.c:298:3: warning: Assigned value is garbage or undefined off_t pre_off = pre_off; /* stupid GCC... */ ^ ~~~~~~~ This code uses an old and common idiom for suppressing an "uninitialized variable" warning, and clang is wrong to warn about it. The idiom tells the compiler to leave the variable uninitialized, which saves a few bytes of code size, and, more importantly, allows valgrind to check at runtime that the variable is properly initialized by the time it is used. But MSVC and clang do not know that idiom, so let's avoid it in vcs-svn/ code. Initialize pre_off to -1, a recognizably meaningless value, to allow future code changes that cause pre_off to be used before it is initialized to be caught early. Signed-off-by: David Barr <davidbarr@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'git-rebase--am.sh')
0 files changed, 0 insertions, 0 deletions