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

Minor Coverity issues found in tcp_adaptor.c #257

Closed
kgiusti opened this issue Mar 29, 2022 · 0 comments · Fixed by #421
Closed

Minor Coverity issues found in tcp_adaptor.c #257

kgiusti opened this issue Mar 29, 2022 · 0 comments · Fixed by #421
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kgiusti
Copy link
Contributor

kgiusti commented Mar 29, 2022

254static int handle_incoming_raw_read(qdr_tcp_connection_t *conn, qd_buffer_list_t *buffers)
255{
256 pn_raw_buffer_t raw_buffer;
257 if (read_window_full(conn) || !pn_raw_connection_take_read_buffers(conn->pn_raw_conn, &raw_buffer, 1)) {
258 return 0;
259 }
260 int result = raw_buffer.size;
CID 379175 (#1 of 1): Invalid type in argument to printf format specifier (PRINTF_ARGS)invalid_type: Argument result to format specifier %zu was expected to have type size_t(unsigned long) but has type int. [show details]
261 qd_log(tcp_adaptor->log_source, QD_LOG_DEBUG,
262 "[C%"PRIu64"] pn_raw_connection_take_read_buffers() took buffer with %zu bytes",
263 conn->conn_id, result);
264


614 conn->previous_stream_data = 0;
615 }
616
617 conn->outgoing_buff_idx += used;
CID 379192 (#2 of 2): Invalid type in argument to printf format specifier (PRINTF_ARGS)invalid_type: Argument used to format specifier %i was expected to have type int but has type unsigned long. [show details]
618 qd_log(tcp_adaptor->log_source, QD_LOG_DEBUG,
619 "[C%"PRIu64"] Copied %i buffers, %i remain", conn->conn_id, used, conn->outgoing_buff_count - conn->outgoing_buff_idx);
620 }
621 return result;

@kgiusti kgiusti self-assigned this Mar 29, 2022
@kgiusti kgiusti added the bug Something isn't working label Mar 30, 2022
@ganeshmurthy ganeshmurthy added this to the 2.1.0 milestone Apr 12, 2022
ganeshmurthy added a commit to ganeshmurthy/skupper-router that referenced this issue May 3, 2022
@kgiusti kgiusti linked a pull request May 4, 2022 that will close this issue
@ganeshmurthy ganeshmurthy modified the milestones: 2.1.0, 2.0.1 May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants