fix uninitialised variable

This commit is contained in:
rfm 2024-05-26 16:49:22 +01:00
parent f29c24e362
commit 1e0023dc43
2 changed files with 6 additions and 2 deletions

View file

@ -178,6 +178,7 @@ static int tuneSndBuf = 0;
* that multiple processes can serve the same port simultaneously.
* We don't want that broken behavior!
*/
value = 1;
if (setsockopt(desc, SOL_SOCKET, SO_REUSEADDR, (char*)&value, sizeof(value))
< 0)
{

View file

@ -273,7 +273,7 @@ static Class GSAttrDictionaryClass = 0;
@end
gs_thread_key_t thread_last_error_key;
static gs_thread_key_t thread_last_error_key;
static void GS_WINAPI
exitedThread(void *lastErrorPtr)
@ -379,7 +379,10 @@ static NSStringEncoding defaultEncoding;
{
defaultEncoding = [NSString defaultCStringEncoding];
GSAttrDictionaryClass = [GSAttrDictionary class];
GS_THREAD_KEY_INIT(thread_last_error_key, exitedThread);
if (!GS_THREAD_KEY_INIT(thread_last_error_key, exitedThread))
{
NSLog(@"Problem initialising thread error key");
}
}
- (void) dealloc