]> sigrok.org Git - libsigrokdecode.git/blobdiff - tests/runtc.c
Fix warnings exposed by -Wmissing-prototypes.
[libsigrokdecode.git] / tests / runtc.c
index 9ba51f4a4ca8f4453f78e3aca70d812bd87e6236..ab1f5e9ad1a99ec5199cb327bee2624c1ef709d5 100644 (file)
@@ -36,7 +36,6 @@
 #endif
 #include "../config.h"
 
-
 int debug = FALSE;
 int statistics = FALSE;
 
@@ -66,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);
@@ -74,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;
 
@@ -85,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;
 
@@ -94,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;
 
@@ -106,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;
 
@@ -118,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);
@@ -138,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;
@@ -406,7 +405,7 @@ static int run_testcase(char *infile, GSList *pdlist, struct output *op)
                        /* Only annotations and binary can have a class. */
                        return FALSE;
                idx = 0;
-               while(l) {
+               while (l) {
                        decoder_class = l->data;
                        if (!strcmp(decoder_class[0], op->class)) {
                                op->class_idx = idx;
@@ -456,7 +455,7 @@ int main(int argc, char **argv)
        pdlist = NULL;
        opt_infile = NULL;
        pd = NULL;
-       while((c = getopt(argc, argv, "dP:p:o:i:O:f:S")) != -1) {
+       while ((c = getopt(argc, argv, "dP:p:o:i:O:f:S")) != -1) {
                switch(c) {
                case 'd':
                        debug = TRUE;
@@ -559,5 +558,3 @@ int main(int argc, char **argv)
 
        return ret;
 }
-
-