From acaa2723308a3cd5b90c0f337520478f67910804 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 18 Jul 2020 13:55:55 +0200 Subject: LLExtStat had been a S32, this wasn't right, as some of the constants lead to integer overflow: const LLExtStat LL_EXSTAT_RES_RESULT = 2L<<30; const LLExtStat LL_EXSTAT_VFS_RESULT = 3L<<30; This shifts into the sign bit and clang gets (rightfully) upset about this. LLExtStatus needs to be at least of type U32 to remedy this problem, but while at it it makes sense to turn it into what it is: An enum. Turning it into a class enum has the added benefit we get type safety for mostly free. Which incidentally turned up a problem right away: A call to removeAndCallbackPendingDownloads had status and extstatus reversed and thus was wrong. --- indra/llmessage/lltransfertargetvfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmessage/lltransfertargetvfile.cpp') diff --git a/indra/llmessage/lltransfertargetvfile.cpp b/indra/llmessage/lltransfertargetvfile.cpp index a572c68a7f..6fc971cc69 100644 --- a/indra/llmessage/lltransfertargetvfile.cpp +++ b/indra/llmessage/lltransfertargetvfile.cpp @@ -227,7 +227,7 @@ void LLTransferTargetVFile::completionCallback(const LLTSCode status) mParams.getAssetID(), mParams.getAssetType(), mParams.mRequestDatap, - LL_EXSTAT_NONE); + LLExtStat::LL_EXSTAT_NONE); } delete mParams.mRequestDatap; mParams.mRequestDatap = NULL; -- cgit v1.2.3 From fba9abbb193c89c2c026745ca153a4a8206f3973 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Tue, 21 Jul 2020 16:09:34 +0200 Subject: Remove redundant LL_EXSTAT_ from enums. --- indra/llmessage/lltransfertargetvfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmessage/lltransfertargetvfile.cpp') diff --git a/indra/llmessage/lltransfertargetvfile.cpp b/indra/llmessage/lltransfertargetvfile.cpp index 6fc971cc69..b27f0881e0 100644 --- a/indra/llmessage/lltransfertargetvfile.cpp +++ b/indra/llmessage/lltransfertargetvfile.cpp @@ -227,7 +227,7 @@ void LLTransferTargetVFile::completionCallback(const LLTSCode status) mParams.getAssetID(), mParams.getAssetType(), mParams.mRequestDatap, - LLExtStat::LL_EXSTAT_NONE); + LLExtStat::NONE); } delete mParams.mRequestDatap; mParams.mRequestDatap = NULL; -- cgit v1.2.3