fix: replace NULL with nullptr in fake_notificationconsumer constructors#4686
fix: replace NULL with nullptr in fake_notificationconsumer constructors#4686xq9mend wants to merge 1 commit into
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
2747810 to
91192c0
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
91192c0 to
e68a01c
Compare
|
/azpw run Azure.sonic-swss |
|
Retrying failed(or canceled) jobs... |
|
No Azure DevOps builds found for #4686. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-swss |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1144009: ✅Stage Test:
|
|
/azpw run Azure.sonic-swss |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1144009: ✅Stage Test:
|
e68a01c to
41fb8e3
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-swss |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1144964: ✅Stage BuildTrixie:
✅Stage Test:
✅Stage BuildAsan: |
NULL is an integer literal (0) which is ambiguous when the member type is std::unique_ptr (introduced in sonic-swss-common PR sonic-net#1212). nullptr has type std::nullptr_t and is unambiguous for both raw pointer and unique_ptr, making this change forward-compatible. Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
41fb8e3 to
446b4ed
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Friendly ping — all build checks are passing (amd64, arm64, armhf, trixie, asan, docker). The |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Pinging again on this — the All 14 build checks pass: amd64, arm64, armhf, trixie, asan, docker, BuildAsan. #4680 was merged with the same vstest failure as precedent. This PR is blocking a chain of 4 sonic-swss-common PRs (#1211, #1212, #1213, #1214). Would appreciate a merge bypass when you get a chance. Thanks! |
|
/azp run Azure.sonic-swss |
|
Commenter does not have sufficient privileges for PR 4686 in repo sonic-net/sonic-swss |
Why
NULLis an integer literal (0) which is ambiguous when the member type isstd::unique_ptr— the compiler cannot choose betweenunique_ptr(nullptr_t)andunique_ptr(pointer)overloads.This is a forward-compatibility fix for sonic-swss-common#1212, which changes
m_subscribefrom a rawDBConnector*tostd::unique_ptr<DBConnector>. Without this change, BuildSwss fails with:What
Replace
m_subscribe(NULL)withm_subscribe(nullptr)in both constructors infake_notificationconsumer.cpp.nullptrhas typestd::nullptr_tand is unambiguous for both raw pointer andunique_ptr, making this change safe to merge independently before or after sonic-swss-common#1212.How to verify
BuildSwss CI passes.