From 4839831819399c9ed1a4849c4ea93fff32b60039 Mon Sep 17 00:00:00 2001 From: Francesco Emanuele D'Agostino Date: Fri, 10 Apr 2026 13:36:46 +0200 Subject: [PATCH 1/2] Update UploadFile.h just updated the signature of the function. const for the return value is ignored and generate a warning/error with gcc. --- lib/inc/drogon/UploadFile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/inc/drogon/UploadFile.h b/lib/inc/drogon/UploadFile.h index 9c9f1bcd29..33bd4925f5 100644 --- a/lib/inc/drogon/UploadFile.h +++ b/lib/inc/drogon/UploadFile.h @@ -102,7 +102,7 @@ class UploadFile return data_; } - const size_t dataLength() const + size_t dataLength() const { return len_; } From 18e7cb99a1583f3fea1ad2198a0a0b27863c4cae Mon Sep 17 00:00:00 2001 From: Francesco Emanuele D'Agostino Date: Tue, 21 Apr 2026 18:28:55 +0200 Subject: [PATCH 2/2] Fix return statement in SqlBinder.h for callbacks Removing a warning for missing return value. --- orm_lib/inc/drogon/orm/SqlBinder.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/orm_lib/inc/drogon/orm/SqlBinder.h b/orm_lib/inc/drogon/orm/SqlBinder.h index 282657fb6d..92745a127e 100644 --- a/orm_lib/inc/drogon/orm/SqlBinder.h +++ b/orm_lib/inc/drogon/orm/SqlBinder.h @@ -361,22 +361,22 @@ class DROGON_EXPORT SqlBinder : public trantor::NonCopyable // LOG_DEBUG << "ptr callback"; isExceptionPtr_ = true; exceptionPtrCallback_ = std::forward(callback); - return *this; } else { isExceptionPtr_ = false; exceptionCallback_ = std::forward(callback); - return *this; } } - else if constexpr (traits::isSqlCallback) + + if constexpr (traits::isSqlCallback) { callbackHolder_ = std::shared_ptr( new CallbackHolder::type>( std::forward(callback))); - return *this; } + + return *this; } template