various: Fix GCC 11.2 compilation issues.

* Initialize some variables that are never used anyway.

* Use valid pointers instead of integers cast to void pointers when
  calling pthread_setspecific().

ASTERISK-29711 #close
ASTERISK-29713 #close

Change-Id: I8728cd6f2f4b28e0e48113c5da450b768c2a6683
This commit is contained in:
Sean Bright
2021-10-29 15:05:18 +00:00
parent 08cb67251f
commit 2c03f73016
3 changed files with 4 additions and 4 deletions

View File

@@ -2213,7 +2213,7 @@ void ast_log_safe(int level, const char *file, int line, const char *function, c
return;
}
if (ast_threadstorage_set_ptr(&in_safe_log, (void*)1)) {
if (ast_threadstorage_set_ptr(&in_safe_log, &(int) { 1 })) {
/* We've failed to set the flag that protects against
* recursion, so bail. */
return;