1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Rearrange a variable declaration in the proxy locking code to avoid a harmless

compiler warning on recent MacOS versions.

FossilOrigin-Name: 39bbd35599e735b32f7ed18143073165b805dd98
This commit is contained in:
drh
2010-12-21 00:16:40 +00:00
parent 08bd9f83ce
commit 29ecd8a077
3 changed files with 15 additions and 24 deletions

View File

@@ -5403,18 +5403,19 @@ extern int gethostuuid(uuid_t id, const struct timespec *wait);
** bytes of writable memory.
*/
static int proxyGetHostID(unsigned char *pHostID, int *pError){
struct timespec timeout = {1, 0}; /* 1 sec timeout */
assert(PROXY_HOSTIDLEN == sizeof(uuid_t));
memset(pHostID, 0, PROXY_HOSTIDLEN);
#if defined(__MAX_OS_X_VERSION_MIN_REQUIRED)\
&& __MAC_OS_X_VERSION_MIN_REQUIRED<1050
if( gethostuuid(pHostID, &timeout) ){
int err = errno;
if( pError ){
*pError = err;
{
static const struct timespec timeout = {1, 0}; /* 1 sec timeout */
if( gethostuuid(pHostID, &timeout) ){
int err = errno;
if( pError ){
*pError = err;
}
return SQLITE_IOERR;
}
return SQLITE_IOERR;
}
#endif
#ifdef SQLITE_TEST