]> sigrok.org Git - libsigrok.git/blobdiff - src/dmm/bm52x.c
dmm/bm52x: silence compiler warning related to printf() buffer size
[libsigrok.git] / src / dmm / bm52x.c
index 69c017194aa0ebc31983bb9f3d29092f1b663039..3a4a62b36ce9a4acd7bb40e6d0987ad02cef6977 100644 (file)
@@ -649,6 +649,7 @@ static uint16_t bm52x_rec_checksum(const uint8_t *b, size_t l)
  * Retrieve the first/next chunk of recording information.
  * Support for live readings is theoretical, and unused/untested.
  */
+#ifdef HAVE_SERIAL_COMM
 static int bm52x_rec_next_rsp(struct sr_serial_dev_inst *serial,
        enum bm52x_reqtype req, struct brymen_bm52x_state *state)
 {
@@ -726,6 +727,17 @@ static int bm52x_rec_next_rsp(struct sr_serial_dev_inst *serial,
 
        return SR_OK;
 }
+#else /* have serial comm */
+static int bm52x_rec_next_rsp(struct sr_serial_dev_inst *serial,
+       enum bm52x_reqtype req, struct brymen_bm52x_state *state)
+{
+       (void)serial;
+       (void)req;
+       (void)state;
+       (void)bm52x_rec_checksum;
+       return SR_ERR_NA;
+}
+#endif /* have serial comm */
 
 /** Make sure a minimum amount of response data is available. */
 static const uint8_t *bm52x_rec_ensure(struct sr_serial_dev_inst *serial,
@@ -1350,7 +1362,7 @@ SR_PRIV int brymen_bm52x_config_get(void *st, uint32_t key, GVariant **data,
        const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        struct brymen_bm52x_state *state;
-       char text[20];
+       char text[32];
 
        state = st;
 
@@ -1416,7 +1428,7 @@ SR_PRIV int brymen_bm52x_config_list(void *st, uint32_t key, GVariant **data,
        int ret;
        size_t count, idx;
        GVariantBuilder gvb;
-       char name[20];
+       char name[32];
 
        /*
         * Have common keys handled by caller's common code.