journal: fix build in VALGRIND compatibility mode
This commit is contained in:
parent
1ca6783f5e
commit
1b4bb4fdac
5
README
5
README
|
@ -105,6 +105,11 @@ WARNINGS:
|
||||||
For more information on this issue consult
|
For more information on this issue consult
|
||||||
http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
|
http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
|
||||||
|
|
||||||
|
To run systemd under valgrind, compile with VALGRIND defined
|
||||||
|
(e.g. ./configure CPPFLAGS='... -DVALGRIND=1'). Otherwise,
|
||||||
|
false positives will be triggered by code which violates
|
||||||
|
some rules but is actually safe.
|
||||||
|
|
||||||
ENGINEERING AND CONSULTING SERVICES:
|
ENGINEERING AND CONSULTING SERVICES:
|
||||||
ProFUSION <http://profusion.mobi> offers professional
|
ProFUSION <http://profusion.mobi> offers professional
|
||||||
engineering and consulting services for systemd for embedded
|
engineering and consulting services for systemd for embedded
|
||||||
|
|
|
@ -337,8 +337,9 @@ uint32_t jenkins_hashlittle( const void *key, size_t length, uint32_t initval)
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* make valgrind happy */
|
#else /* make valgrind happy */
|
||||||
|
{
|
||||||
|
const uint8_t *k8 = (const uint8_t *) k;
|
||||||
|
|
||||||
k8 = (const uint8_t *)k;
|
|
||||||
switch(length)
|
switch(length)
|
||||||
{
|
{
|
||||||
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
|
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
|
||||||
|
@ -355,6 +356,7 @@ uint32_t jenkins_hashlittle( const void *key, size_t length, uint32_t initval)
|
||||||
case 1 : a+=k8[0]; break;
|
case 1 : a+=k8[0]; break;
|
||||||
case 0 : return c;
|
case 0 : return c;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* !valgrind */
|
#endif /* !valgrind */
|
||||||
|
|
||||||
|
@ -522,7 +524,8 @@ void jenkins_hashlittle2(
|
||||||
|
|
||||||
#else /* make valgrind happy */
|
#else /* make valgrind happy */
|
||||||
|
|
||||||
k8 = (const uint8_t *)k;
|
{
|
||||||
|
const uint8_t *k8 = (const uint8_t *)k;
|
||||||
switch(length)
|
switch(length)
|
||||||
{
|
{
|
||||||
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
|
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
|
||||||
|
@ -539,6 +542,7 @@ void jenkins_hashlittle2(
|
||||||
case 1 : a+=k8[0]; break;
|
case 1 : a+=k8[0]; break;
|
||||||
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
|
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* !valgrind */
|
#endif /* !valgrind */
|
||||||
|
|
||||||
|
@ -698,7 +702,8 @@ uint32_t jenkins_hashbig( const void *key, size_t length, uint32_t initval)
|
||||||
|
|
||||||
#else /* make valgrind happy */
|
#else /* make valgrind happy */
|
||||||
|
|
||||||
k8 = (const uint8_t *)k;
|
{
|
||||||
|
const uint8_t *k8 = (const uint8_t *)k;
|
||||||
switch(length) /* all the case statements fall through */
|
switch(length) /* all the case statements fall through */
|
||||||
{
|
{
|
||||||
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
|
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
|
||||||
|
@ -715,6 +720,7 @@ uint32_t jenkins_hashbig( const void *key, size_t length, uint32_t initval)
|
||||||
case 1 : a+=((uint32_t)k8[0])<<24; break;
|
case 1 : a+=((uint32_t)k8[0])<<24; break;
|
||||||
case 0 : return c;
|
case 0 : return c;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* !VALGRIND */
|
#endif /* !VALGRIND */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue