Skip to content

Commit

Permalink
PROTON-2714: fix wrong printf format specifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek committed Oct 14, 2023
1 parent a321bf9 commit 2b7aa94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion c/src/core/connection_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static pn_event_t *batch_next(pn_connection_driver_t *d) {
/* Log the next event that will be processed */
pn_event_t *next = pn_collector_next(d->collector);
if (next && PN_SHOULD_LOG(&d->transport->logger, PN_SUBSYSTEM_EVENT, PN_LEVEL_DEBUG)) {
pni_logger_log_msg_inspect(&d->transport->logger, PN_SUBSYSTEM_EVENT, PN_LEVEL_DEBUG, next, "");
pni_logger_log_msg_inspect(&d->transport->logger, PN_SUBSYSTEM_EVENT, PN_LEVEL_DEBUG, next, "%s", "");
}
return next;
}
Expand Down
2 changes: 1 addition & 1 deletion c/src/core/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void pni_logger_log_raw(pn_logger_t *logger, pn_log_subsystem_t subsystem, pn_lo
const char *start = &bytes.start[bytes.size-size];
for (unsigned i = 0; i < size; i+=16) {
pn_fixed_string_t out = pn_fixed_string(buf, sizeof(buf));
pn_fixed_string_addf(&out, "%s%04x/%04x: ", msg, i, size);
pn_fixed_string_addf(&out, "%s%04x/%04zx: ", msg, i, size);
for (unsigned j = 0; j<16; j++) {
if (i+j<size) {
pn_fixed_string_addf(&out, "%02hhx ", start[i+j]);
Expand Down
2 changes: 1 addition & 1 deletion c/src/ssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ static ssize_t process_input_ssl( pn_transport_t *transport, unsigned int layer,
transport->present_layers |= LAYER_SSL;
}

ssl_log( transport, PN_LEVEL_TRACE, "process_input_ssl( data size=%d )",available );
ssl_log( transport, PN_LEVEL_TRACE, "process_input_ssl( data size=%zu )",available );

ssize_t consumed = 0;
bool work_pending;
Expand Down

0 comments on commit 2b7aa94

Please sign in to comment.