Replacing GPR_ASSERT with c assert (#281)

Latest GRPC >= 2.66 has dropped GRPC_ASSERT macro [1]

[1]
0e23c2259d

Upstream-Status: Pending

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2024-11-11 18:14:43 -08:00 committed by GitHub
parent 662573b6bf
commit 216b86f8d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,15 @@
#include <grpc/support/log.h>
#include <grpcpp/support/status.h>
#include "etcd/v3/action_constants.hpp"
#include <cstdlib>
#ifndef GPR_ASSERT
#define GPR_ASSERT(x) \
if (!(x)) { \
fprintf(stderr, "%s:%d assert failed\n", __FILE__, __LINE__); \
abort(); \
}
#endif
etcdv3::Action::Action(etcdv3::ActionParameters const& params) {
parameters = params;