From 91a0b530407f10d556e6bfc1da989bb45c250743 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 17 Nov 2021 21:09:31 -0500 Subject: [PATCH] HaikuDepot: Do not inadvertently modify the real errno. Found by GCC 11 warnings. --- src/apps/haikudepot/server/ServerHelper.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/haikudepot/server/ServerHelper.cpp b/src/apps/haikudepot/server/ServerHelper.cpp index ebb86e307e..203d8332ac 100644 --- a/src/apps/haikudepot/server/ServerHelper.cpp +++ b/src/apps/haikudepot/server/ServerHelper.cpp @@ -116,20 +116,20 @@ ServerHelper::NotifyTransportError(status_t error) /*static*/ void ServerHelper::AlertTransportError(BMessage* message) { - status_t errno = B_OK; + status_t error = B_OK; int64 errnoInt64; message->FindInt64("errno", &errnoInt64); - errno = (status_t) errnoInt64; + error = (status_t) errnoInt64; BString errorDescription("?"); BString alertText; - switch (errno) { + switch (error) { case HD_NETWORK_INACCESSIBLE: errorDescription = B_TRANSLATE("Network error"); break; default: - errorDescription.SetTo(strerror(errno)); + errorDescription.SetTo(strerror(error)); break; }