From: Aurelien Jacobs Date: Tue, 14 Jan 2014 22:29:17 +0000 (+0100) Subject: remove unused static functions X-Git-Tag: libsigrok-0.3.0~283 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8a2aaffa02d333219ba9159b581a2a7482e5185f;p=libsigrok.git remove unused static functions --- diff --git a/hardware/common/scpi_serial.c b/hardware/common/scpi_serial.c index 052d6c1e..9711c010 100644 --- a/hardware/common/scpi_serial.c +++ b/hardware/common/scpi_serial.c @@ -105,60 +105,6 @@ static int scpi_serial_send(void *priv, const char *command) return SR_OK; } -static int scpi_serial_receive(void *priv, char **scpi_response) -{ - int len, ret; - char buf[256]; - unsigned int i; - GString *response; - struct scpi_serial *sscpi = priv; - struct sr_serial_dev_inst *serial = sscpi->serial; - - response = g_string_sized_new(1024); - - for (i = 0; i <= SCPI_READ_RETRIES; i++) { - while ((len = serial_read(serial, buf, sizeof(buf))) > 0) - response = g_string_append_len(response, buf, len); - - if (response->len > 0 && - response->str[response->len-1] == '\n') { - sr_spew("Fetched full SCPI response."); - break; - } - - g_usleep(SCPI_READ_RETRY_TIMEOUT); - } - - if (response->len == 0) { - sr_dbg("No SCPI response received."); - g_string_free(response, TRUE); - *scpi_response = NULL; - return SR_ERR; - } else if (response->str[response->len - 1] == '\n') { - /* - * The SCPI response contains a LF ('\n') at the end and we - * don't need this so replace it with a '\0' and decrement - * the length. - */ - response->str[--response->len] = '\0'; - ret = SR_OK; - } else { - sr_warn("Incomplete SCPI response received!"); - ret = SR_ERR; - } - - /* Minor optimization: steal the string instead of copying. */ - *scpi_response = response->str; - - /* A SCPI response can be quite large, print at most 50 characters. */ - sr_dbg("SCPI response received (length %d): '%.50s'", - response->len, response->str); - - g_string_free(response, FALSE); - - return ret; -} - static int scpi_serial_read_begin(void *priv) { struct scpi_serial *sscpi = priv; diff --git a/hardware/kecheng-kc-330b/protocol.c b/hardware/kecheng-kc-330b/protocol.c index 1e12f0fd..ba55f36f 100644 --- a/hardware/kecheng-kc-330b/protocol.c +++ b/hardware/kecheng-kc-330b/protocol.c @@ -336,15 +336,3 @@ SR_PRIV int kecheng_kc_330b_log_info_get(const struct sr_dev_inst *sdi, return SR_OK; } - -static int kecheng_kc_330b_log_date_time_get(const struct sr_dev_inst *sdi, - gboolean *tmp) -{ - - (void)sdi; - (void)tmp; - - /* TODO */ - - return SR_OK; -}