Skip to content

Commit b04da69

Browse files
Fixing compilation warnings
1 parent 8230463 commit b04da69

File tree

8 files changed

+18
-15
lines changed

8 files changed

+18
-15
lines changed

storage/ndb/rest-server2/server/src/ttl_purge.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ void TTLPurger::SchemaWatcherJob() {
122122
NdbEventOperation* op = nullptr;
123123
NdbDictionary::Dictionary::List list;
124124
const char* message_buf = "API_OK";
125+
#ifdef DEBUG_EVENT
125126
Uint32 event_nums = 0;
127+
#endif
126128
[[maybe_unused]] char event_name_buf[128];
127129
char slock_buf_pre[32];
128130
char slock_buf[32];
@@ -353,11 +355,13 @@ void TTLPurger::SchemaWatcherJob() {
353355
op->getNdbError().message);
354356
goto err;
355357
}
358+
#ifdef DEBUG_EVENT
356359
event_nums++;
357360
DEB_EVENT("EVENT [%u]: %s, GCI = %llu",
358361
event_nums,
359362
GetEventName(op->getEventType(), event_name_buf),
360363
op->getGCI());
364+
#endif
361365
char* ptr_pre = nullptr;
362366
char* ptr = nullptr;
363367
std::string db_str_pre;
@@ -922,13 +926,15 @@ enum SpecialShardVal {
922926
kShardFirst = 0
923927
};
924928

929+
/*
925930
static const uint mon_lengths[2][MONS_PER_YEAR] = {
926931
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
927932
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};
933+
static const uint year_lengths[2] = {DAYS_PER_NYEAR, DAYS_PER_LYEAR};
934+
*/
928935
static const uint mon_starts[2][MONS_PER_YEAR] = {
929936
{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334},
930937
{0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335}};
931-
static const uint year_lengths[2] = {DAYS_PER_NYEAR, DAYS_PER_LYEAR};
932938
#define LEAPS_THRU_END_OF(y) ((y) / 4 - (y) / 100 + (y) / 400)
933939
static my_time_t sec_since_epoch(int year, int mon, int mday, int hour, int min,
934940
int sec) {

storage/ndb/rest-server2/server/src/ttl_purge.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class TTLPurger {
7070
Ndb* worker_ndb_;
7171
std::atomic<bool> exit_;
7272

73-
typedef struct {
73+
typedef struct TTLInfo {
7474
Int32 table_id;
7575
Uint32 ttl_sec;
7676
Uint32 col_no;

storage/ndb/src/rondis/include/dispatch_thread.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// of patent rights can be found in the PATENTS file in the same directory.
55

66
/*
7-
Copyright (c) 2024, 2024, Hopsworks and/or its affiliates.
7+
Copyright (c) 2024, 2025, Hopsworks and/or its affiliates.
88
99
This program is free software; you can redistribute it and/or modify
1010
it under the terms of the GNU General Public License, version 2.0,
@@ -70,7 +70,7 @@ class DispatchThread : public ServerThread {
7070
int queue_limit,
7171
const ServerHandle* handle);
7272

73-
virtual ~DispatchThread();
73+
virtual ~DispatchThread() override;
7474

7575
virtual int StartThread() override;
7676

storage/ndb/src/rondis/include/pink_thread.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// of patent rights can be found in the PATENTS file in the same directory.
55

66
/*
7-
Copyright (c) 2024, 2024, Hopsworks and/or its affiliates.
7+
Copyright (c) 2024, 2025, Hopsworks and/or its affiliates.
88
99
This program is free software; you can redistribute it and/or modify
1010
it under the terms of the GNU General Public License, version 2.0,

storage/ndb/src/rondis/include/redis_conn.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// of patent rights can be found in the PATENTS file in the same directory.
55

66
/*
7-
Copyright (c) 2024, 2024, Hopsworks and/or its affiliates.
7+
Copyright (c) 2024, 2025, Hopsworks and/or its affiliates.
88
99
This program is free software; you can redistribute it and/or modify
1010
it under the terms of the GNU General Public License, version 2.0,
@@ -56,7 +56,7 @@ class RedisConn: public PinkConn {
5656
PinkEpoll* pink_epoll = nullptr,
5757
const HandleType& handle_type = kSynchronous,
5858
const int rbuf_max_len = REDIS_MAX_MESSAGE);
59-
virtual ~RedisConn();
59+
virtual ~RedisConn() override;
6060

6161
virtual ReadStatus GetRequest() override;
6262
virtual WriteStatus SendReply() override;

storage/ndb/src/rondis/include/rondis_thread.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class RondisConn : public pink::RedisConn
4343
const std::string &ip_port,
4444
pink::Thread *thread,
4545
void *worker_specific_data);
46-
virtual ~RondisConn() = default;
46+
virtual ~RondisConn() override = default;
4747

4848
protected:
4949
int DealMessage(const pink::RedisCmdArgsType &argv, std::string *response) override;

storage/ndb/src/rondis/include/server_thread.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// of patent rights can be found in the PATENTS file in the same directory.
55

66
/*
7-
Copyright (c) 2024, 2024, Hopsworks and/or its affiliates.
7+
Copyright (c) 2024, 2025, Hopsworks and/or its affiliates.
88
99
This program is free software; you can redistribute it and/or modify
1010
it under the terms of the GNU General Public License, version 2.0,
@@ -179,7 +179,7 @@ class ServerThread : public Thread {
179179
virtual void SetQueueLimit([[maybe_unused]]/*todo remove?*/
180180
int queue_limit) { }
181181

182-
virtual ~ServerThread();
182+
virtual ~ServerThread() override;
183183

184184
protected:
185185
/*
@@ -251,14 +251,11 @@ extern ServerThread *NewHolyThread(
251251
* This type Dispatch thread just get Connection and then Dispatch the fd to
252252
* worker thread
253253
*
254-
* @brief
255-
*
256254
* @param port the port number
257255
* @param conn_factory connection factory object
258256
* @param cron_interval the cron job interval
259257
* @param queue_limit the size limit of workers' connection queue
260258
* @param handle the server's handle (e.g. CronHandle, AccessHandle...)
261-
* @param ehandle the worker's enviroment setting handle
262259
*/
263260
extern ServerThread *NewDispatchThread(
264261
int port,

storage/ndb/src/rondis/include/worker_thread.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// of patent rights can be found in the PATENTS file in the same directory.
55

66
/*
7-
Copyright (c) 2024, 2024, Hopsworks and/or its affiliates.
7+
Copyright (c) 2024, 2025, Hopsworks and/or its affiliates.
88
99
This program is free software; you can redistribute it and/or modify
1010
it under the terms of the GNU General Public License, version 2.0,
@@ -59,7 +59,7 @@ class WorkerThread : public Thread {
5959
explicit WorkerThread(ConnFactory *conn_factory, ServerThread* server_thread,
6060
int queue_limit_, int cron_interval = 0);
6161

62-
virtual ~WorkerThread();
62+
virtual ~WorkerThread() override;
6363

6464
void set_keepalive_timeout(int timeout) {
6565
keepalive_timeout_ = timeout;

0 commit comments

Comments
 (0)