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/llxfer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmessage/llxfer.cpp') diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp index 32e0e2cc3b..fcd77b93a8 100644 --- a/indra/llmessage/llxfer.cpp +++ b/indra/llmessage/llxfer.cpp @@ -319,7 +319,7 @@ S32 LLXfer::processEOF() if (mCallback) { - mCallback(mCallbackDataHandle,mCallbackResult,LL_EXSTAT_NONE); + mCallback(mCallbackDataHandle,mCallbackResult, LLExtStat::LL_EXSTAT_NONE); } return(retval); -- 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/llxfer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmessage/llxfer.cpp') diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp index fcd77b93a8..93d5cfc131 100644 --- a/indra/llmessage/llxfer.cpp +++ b/indra/llmessage/llxfer.cpp @@ -319,7 +319,7 @@ S32 LLXfer::processEOF() if (mCallback) { - mCallback(mCallbackDataHandle,mCallbackResult, LLExtStat::LL_EXSTAT_NONE); + mCallback(mCallbackDataHandle,mCallbackResult, LLExtStat::NONE); } return(retval); -- cgit v1.2.3