@@ -104,7 +104,7 @@ const char* const INET_LOCALHOST = "localhost";
104104using namespace Firebird ;
105105
106106namespace {
107- void handle_error (ISC_STATUS code)
107+ [[noreturn]] void handle_error (ISC_STATUS code)
108108 {
109109 Arg::Gds (code).raise ();
110110 }
@@ -425,7 +425,7 @@ class Batch final : public RefCntIface<IBatchImpl<Batch, CheckStatusWrapper> >
425425 {
426426 fb_assert (messageStreamBuffer);
427427
428- const UCHAR* ptr = reinterpret_cast <const UCHAR*>(p);
428+ const UCHAR* ptr = static_cast <const UCHAR*>(p);
429429
430430 while (count)
431431 {
@@ -484,7 +484,7 @@ class Batch final : public RefCntIface<IBatchImpl<Batch, CheckStatusWrapper> >
484484 {
485485 fb_assert (blobStreamBuffer);
486486
487- const UCHAR* ptr = reinterpret_cast <const UCHAR*>(p);
487+ const UCHAR* ptr = static_cast <const UCHAR*>(p);
488488
489489 while (size)
490490 {
@@ -886,9 +886,9 @@ class Attachment final : public RefCntIface<IAttachmentImpl<Attachment, CheckSta
886886 void executeDyn (CheckStatusWrapper* status, ITransaction* transaction, unsigned int length,
887887 const unsigned char * dyn) override ;
888888 Statement* prepare (CheckStatusWrapper* status, ITransaction* transaction,
889- unsigned int stmtLength, const char * sqlStmt, unsigned dialect, unsigned int flags) override ;
889+ unsigned int stmtLength, const char * sqlStmt, unsigned int dialect, unsigned int flags) override ;
890890 ITransaction* execute (CheckStatusWrapper* status, ITransaction* transaction,
891- unsigned int stmtLength, const char * sqlStmt, unsigned dialect,
891+ unsigned int stmtLength, const char * sqlStmt, unsigned int dialect,
892892 IMessageMetadata* inMetadata, void * inBuffer, IMessageMetadata* outMetadata, void * outBuffer) override ;
893893 IResultSet* openCursor (CheckStatusWrapper* status, ITransaction* transaction,
894894 unsigned int stmtLength, const char * sqlStmt, unsigned dialect,
@@ -1138,7 +1138,7 @@ static bool init(CheckStatusWrapper*, ClntAuthBlock&, rem_port*, P_OP, PathName&
11381138 ClumpletWriter&, IntlParametersBlock&, ICryptKeyCallback* cryptCallback);
11391139static Rtr* make_transaction (Rdb*, USHORT);
11401140static void mov_dsql_message (const UCHAR*, const rem_fmt*, UCHAR*, const rem_fmt*);
1141- static void move_error (const Arg::StatusVector& v);
1141+ [[noreturn]] static void move_error (const Arg::StatusVector& v);
11421142static void receive_after_start (Rrq*, USHORT);
11431143static void receive_packet (rem_port*, PACKET *);
11441144static void receive_packet_noqueue (rem_port*, PACKET *);
@@ -1167,10 +1167,10 @@ static void authReceiveResponse(bool havePacket, ClntAuthBlock& authItr, rem_por
11671167
11681168static AtomicCounter remote_event_id;
11691169
1170- static const unsigned ANALYZE_USER_VFY = 0x01 ;
1171- static const unsigned ANALYZE_LOOPBACK = 0x02 ;
1172- static const unsigned ANALYZE_MOUNTS = 0x04 ;
1173- static const unsigned ANALYZE_EMP_NAME = 0x08 ;
1170+ static constexpr unsigned ANALYZE_USER_VFY = 0x01 ;
1171+ static constexpr unsigned ANALYZE_LOOPBACK = 0x02 ;
1172+ static constexpr unsigned ANALYZE_MOUNTS = 0x04 ;
1173+ static constexpr unsigned ANALYZE_EMP_NAME = 0x08 ;
11741174
11751175inline static void reset (IStatus* status) noexcept
11761176{
@@ -1907,8 +1907,7 @@ IAttachment* RProvider::create(CheckStatusWrapper* status, const char* filename,
19071907 {
19081908 reset (status);
19091909
1910- ClumpletWriter newDpb (ClumpletReader::dpbList, MAX_DPB_SIZE,
1911- reinterpret_cast <const UCHAR*>(dpb), dpb_length);
1910+ ClumpletWriter newDpb (ClumpletReader::dpbList, MAX_DPB_SIZE, dpb, dpb_length);
19121911 unsigned flags = ANALYZE_MOUNTS;
19131912
19141913 if (get_new_dpb (newDpb, dpbParam, loopback))
@@ -9116,7 +9115,7 @@ static void mov_dsql_message(const UCHAR* from_msg,
91169115}
91179116
91189117
9119- static void move_error (const Arg::StatusVector& v)
9118+ [[noreturn]] static void move_error (const Arg::StatusVector& v)
91209119{
91219120/* *************************************
91229121 *
@@ -9386,6 +9385,10 @@ static void receive_packet_noqueue(rem_port* port, PACKET* packet)
93869385 stmt_id = p->packet .p_batch_regblob .p_batch_statement ;
93879386 bCheckResponse = true ;
93889387 break ;
9388+
9389+ default :
9390+ // no special work needed
9391+ break ;
93899392 }
93909393
93919394 receive_packet_with_callback (port, &p->packet );
0 commit comments