Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sonic-swss-common for compilation on Bookworm #825

Merged
merged 5 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
autoconf-archive \
uuid-dev \
libjansson-dev \
nlohmann-json3-dev \
python

- if: matrix.language == 'cpp'
Expand Down
31 changes: 0 additions & 31 deletions ThirdPartyLicenses.txt

This file was deleted.

2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ stages:
steps:
- script: |
sudo apt-get update
sudo apt-get install -y make libtool m4 autoconf dh-exec debhelper cmake pkg-config \
sudo apt-get install -y make libtool m4 autoconf dh-exec debhelper cmake pkg-config nlohmann-json3-dev \
libhiredis-dev libnl-3-dev libnl-genl-3-dev libnl-route-3-dev libnl-nf-3-dev swig3.0 \
libpython2.7-dev libboost-dev libboost-serialization-dev uuid-dev libzmq5 libzmq3-dev
sudo apt-get install -y sudo
Expand Down
2 changes: 1 addition & 1 deletion common/countertable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "common/redisreply.h"
#include "common/rediscommand.h"
#include "common/redisapi.h"
#include "common/json.hpp"
#include <nlohmann/json.hpp>
#include "common/schema.h"
#include "common/countertable.h"

Expand Down
2 changes: 1 addition & 1 deletion common/dbconnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <errno.h>
#include <system_error>
#include <fstream>
#include "json.hpp"
#include <nlohmann/json.hpp>
#include "logger.h"

#include "common/dbconnector.h"
Expand Down
6 changes: 3 additions & 3 deletions common/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ EventSubscriber::init(bool use_cache, int recv_timeout,
RET_ON_ERR(rc == 0, "Fails to set option rc=%d", rc);
}
else {
for (const auto e: *subs_sources) {
for (const auto &e: *subs_sources) {
rc = zmq_setsockopt(sock, ZMQ_SUBSCRIBE, e.c_str(), e.size());
RET_ON_ERR(rc == 0, "Fails to set option rc=%d", rc);
}
Expand Down Expand Up @@ -400,14 +400,14 @@ EventSubscriber::prune_track()
map<time_t, vector<runtime_id_t> > lst;

/* Sort entries by last touched time */
for(const auto e: m_track) {
for(const auto &e: m_track) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

@zbud-msft Could you help review events related code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zbud-msft Reminder for this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

lst[e.second.epoch_secs].push_back(e.first);
}

/* By default it walks from lowest value / earliest timestamp */
map<time_t, vector<runtime_id_t> >::const_iterator itc = lst.begin();
for(; (itc != lst.end()) && (m_track.size() > MAX_PUBLISHERS_COUNT); ++itc) {
for (const auto r: itc->second) {
for (const auto &r: itc->second) {
m_track.erase(r);
}
}
Expand Down
2 changes: 1 addition & 1 deletion common/events_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <errno.h>
#include <cxxabi.h>
#include "string.h"
#include "json.hpp"
#include <nlohmann/json.hpp>
#include "zmq.h"
#include <unordered_map>
#include <boost/serialization/vector.hpp>
Expand Down
2 changes: 1 addition & 1 deletion common/events_pi.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <fstream>
#include <uuid/uuid.h>
#include "string.h"
#include "json.hpp"
#include <nlohmann/json.hpp>
#include "zmq.h"
#include <unordered_map>

Expand Down
2 changes: 1 addition & 1 deletion common/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <limits>

#include "common/json.h"
#include "common/json.hpp"
#include <nlohmann/json.hpp>

using namespace std;

Expand Down
Loading
Loading