diff --git a/client/client_connection.cpp b/client/client_connection.cpp index 8604729f..2f779e4e 100644 --- a/client/client_connection.cpp +++ b/client/client_connection.cpp @@ -578,10 +578,10 @@ ssl_websocket& ClientConnectionWss::getWs() // certificate authority. // In this example we will simply print the certificate's subject name. - char subject_name[256]; + std::array subject_name; X509* cert = X509_STORE_CTX_get_current_cert(ctx.native_handle()); - X509_NAME_oneline(X509_get_subject_name(cert), subject_name, 256); - LOG(INFO, LOG_TAG) << "Verifying cert: '" << subject_name << "', pre verified: " << preverified << "\n"; + X509_NAME_oneline(X509_get_subject_name(cert), subject_name.data(), subject_name.size()); + LOG(INFO, LOG_TAG) << "Verifying cert: '" << subject_name.data() << "', pre verified: " << preverified << "\n"; return preverified; }); diff --git a/client/decoder/flac_decoder.cpp b/client/decoder/flac_decoder.cpp index 930abe30..f2f5d31f 100644 --- a/client/decoder/flac_decoder.cpp +++ b/client/decoder/flac_decoder.cpp @@ -38,11 +38,13 @@ namespace decoder namespace callback { +// NOLINTBEGIN FLAC__StreamDecoderReadStatus read_callback(const FLAC__StreamDecoder* decoder, FLAC__byte buffer[], size_t* bytes, void* client_data); FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder* decoder, const FLAC__Frame* frame, const FLAC__int32* const buffer[], void* client_data); void metadata_callback(const FLAC__StreamDecoder* decoder, const FLAC__StreamMetadata* metadata, void* client_data); void error_callback(const FLAC__StreamDecoder* decoder, FLAC__StreamDecoderErrorStatus status, void* client_data); +// NOLINTEND } // namespace callback namespace @@ -130,6 +132,7 @@ SampleFormat FlacDecoder::setHeader(msg::CodecHeader* chunk) namespace callback { +// NOLINTNEXTLINE FLAC__StreamDecoderReadStatus read_callback(const FLAC__StreamDecoder* /*decoder*/, FLAC__byte buffer[], size_t* bytes, void* client_data) { if (flacHeader != nullptr) @@ -156,7 +159,7 @@ FLAC__StreamDecoderReadStatus read_callback(const FLAC__StreamDecoder* /*decoder return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; } - +// NOLINTNEXTLINE FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder* /*decoder*/, const FLAC__Frame* frame, const FLAC__int32* const buffer[], void* client_data) { diff --git a/server/control_server.cpp b/server/control_server.cpp index 9950c67b..6e2dfb44 100644 --- a/server/control_server.cpp +++ b/server/control_server.cpp @@ -92,10 +92,10 @@ ControlServer::ControlServer(boost::asio::io_context& io_context, const ServerSe // certificate authority. // In this example we will simply print the certificate's subject name. - char subject_name[256]; + std::array subject_name; X509* cert = X509_STORE_CTX_get_current_cert(ctx.native_handle()); - X509_NAME_oneline(X509_get_subject_name(cert), subject_name, 256); - LOG(INFO, LOG_TAG) << "Verifying cert: '" << subject_name << "', pre verified: " << preverified << "\n"; + X509_NAME_oneline(X509_get_subject_name(cert), subject_name.data(), subject_name.size()); + LOG(INFO, LOG_TAG) << "Verifying cert: '" << subject_name.data() << "', pre verified: " << preverified << "\n"; return preverified; });