From: Uwe Hermann Date: Thu, 30 Jan 2014 18:33:13 +0000 (+0100) Subject: Fix warnings exposed by -Wmissing-prototypes. X-Git-Tag: libsigrokdecode-0.3.0~140 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4467372a2e39bb72648eebbb96934147681110c2;p=libsigrokdecode.git Fix warnings exposed by -Wmissing-prototypes. --- diff --git a/libsigrokdecode-internal.h b/libsigrokdecode-internal.h index 898ba04..1fe19ca 100644 --- a/libsigrokdecode-internal.h +++ b/libsigrokdecode-internal.h @@ -62,6 +62,9 @@ SRD_PRIV int srd_info(const char *format, ...); SRD_PRIV int srd_warn(const char *format, ...); SRD_PRIV int srd_err(const char *format, ...); +/* module_sigrokdecode.c */ +PyMODINIT_FUNC PyInit_sigrokdecode(void); + /* util.c */ SRD_PRIV int py_attr_as_str(const PyObject *py_obj, const char *attr, char **outstr); diff --git a/session.c b/session.c index 84c38a6..c073c80 100644 --- a/session.c +++ b/session.c @@ -125,8 +125,7 @@ SRD_API int srd_session_start(struct srd_session *sess) return ret; } -/** @private */ -SRD_PRIV int srd_inst_send_meta(struct srd_decoder_inst *di, int key, +static int srd_inst_send_meta(struct srd_decoder_inst *di, int key, GVariant *data) { PyObject *py_ret; diff --git a/srd.c b/srd.c index a6c16f6..f5b885f 100644 --- a/srd.c +++ b/srd.c @@ -35,9 +35,6 @@ extern int max_session_id; /* decoder.c */ extern SRD_PRIV GSList *pd_list; -/* module_sigrokdecode.c */ -extern PyMODINIT_FUNC PyInit_sigrokdecode(void); - /** @endcond */ /** diff --git a/tests/runtc.c b/tests/runtc.c index b891b3b..ab1f5e9 100644 --- a/tests/runtc.c +++ b/tests/runtc.c @@ -65,7 +65,7 @@ struct output { }; -void logmsg(char *prefix, FILE *out, const char *format, va_list args) +static void logmsg(char *prefix, FILE *out, const char *format, va_list args) { if (prefix) fprintf(out, "%s", prefix); @@ -73,7 +73,7 @@ void logmsg(char *prefix, FILE *out, const char *format, va_list args) fprintf(out, "\n"); } -void DBG(const char *format, ...) +static void DBG(const char *format, ...) { va_list args; @@ -84,7 +84,7 @@ void DBG(const char *format, ...) va_end(args); } -void ERR(const char *format, ...) +static void ERR(const char *format, ...) { va_list args; @@ -93,7 +93,7 @@ void ERR(const char *format, ...) va_end(args); } -int sr_log(void *cb_data, int loglevel, const char *format, va_list args) +static int sr_log(void *cb_data, int loglevel, const char *format, va_list args) { (void)cb_data; @@ -105,7 +105,7 @@ int sr_log(void *cb_data, int loglevel, const char *format, va_list args) return SRD_OK; } -int srd_log(void *cb_data, int loglevel, const char *format, va_list args) +static int srd_log(void *cb_data, int loglevel, const char *format, va_list args) { (void)cb_data; @@ -117,7 +117,7 @@ int srd_log(void *cb_data, int loglevel, const char *format, va_list args) return SRD_OK; } -void usage(char *msg) +static void usage(char *msg) { if (msg) fprintf(stderr, "%s\n", msg); @@ -137,7 +137,7 @@ void usage(char *msg) /* This is a neutered version of libsigrokdecode's py_str_as_str(). It * does no error checking, but then the only strings it processes are * generated by Python's repr(), so are known good. */ -char *py_str_as_str(const PyObject *py_str) +static char *py_str_as_str(const PyObject *py_str) { PyObject *py_encstr; char *str, *outstr;