mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Merge pull request #6812 from libgit2/ethomson/unused-warnings
rand: avoid uninitialized loadavg warnings
This commit is contained in:
@@ -76,10 +76,10 @@ GIT_INLINE(int) getseed(uint64_t *seed)
|
||||
GIT_INLINE(int) getseed(uint64_t *seed)
|
||||
{
|
||||
struct timeval tv;
|
||||
double loadavg[3];
|
||||
int fd;
|
||||
|
||||
# if defined(GIT_RAND_GETLOADAVG)
|
||||
double loadavg[3];
|
||||
bits convert;
|
||||
# endif
|
||||
|
||||
@@ -125,8 +125,6 @@ GIT_INLINE(int) getseed(uint64_t *seed)
|
||||
convert.f = loadavg[0]; *seed ^= (convert.d >> 36);
|
||||
convert.f = loadavg[1]; *seed ^= (convert.d);
|
||||
convert.f = loadavg[2]; *seed ^= (convert.d >> 16);
|
||||
# else
|
||||
GIT_UNUSED(loadavg[0]);
|
||||
# endif
|
||||
|
||||
*seed ^= git_time_monotonic();
|
||||
|
||||
Reference in New Issue
Block a user