Skip to content
Snippets Groups Projects
Commit 1c1e227c authored by Dmitry Ivanov's avatar Dmitry Ivanov Committed by Maksim Kaitmazian
Browse files

fix: Remove dead code

parent 81661f0c
No related branches found
No related tags found
1 merge request!920pgproto module
......@@ -2,6 +2,13 @@ cmake_minimum_required(VERSION 2.8)
project(protocol C)
add_compile_options(
-Wunused-label
# -Wunused-macros
-Wunused-parameter
-Wunused-variable
)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_INCLUDE_PATH})
......
......@@ -12,24 +12,6 @@
#include "attributes.h"
#include "tarantool/trivia/util.h"
/**
* Format of ReadyForQuery message.
* ReadyForQuery informs the frontend that it can safely send a new command.
*/
struct ready_for_query_message {
/** Type byte, equals 'Z' */
uint8_t type;
/** Packet length without the type byte, including len field itself. */
uint32_t len;
/**
* Current backend transaction status indicator.
* Possible values are 'I' if idle (not in a transaction block);
* 'T' if in a transaction block; or 'E' if in a failed transaction
* block (queries will be rejected until block is ended).
*/
uint8_t transaction_status;
};
/**
* Send ReadyForQuery message.
* ReadyForQuery informs the frontend that it can safely send a new command.
......@@ -45,16 +27,6 @@ send_ready_for_query(struct pg_port *port)
pg_flush(port);
}
/** Query message format. */
struct query_message {
/** Type byte. Equals 'Q' */
uint8_t type;
/** Message length, including the len field. */
uint32_t len;
/** The query string. */
const char *query;
};
#define COMPARE_AND_RETURN_IF_EQUALS(query, tag) \
if (strncasecmp(query, tag, strlen(tag)) == 0) \
return tag
......@@ -267,6 +239,7 @@ send_data_row(struct pg_port *port, const char **data,
const struct row_description *row_desc,
uint16_t format)
{
(void)format;
pg_begin_msg(port, 'D');
pg_write_uint16(port, row_desc->natts);
const struct pg_attribute *atts = row_desc->atts;
......
......@@ -270,6 +270,7 @@ server_should_try_again(int err)
static int
server_worker(va_list args)
{
(void)args;
say_info("server has been started");
while (! fiber_is_cancelled()) {
if (server_wait_for_connection()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment