]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/brymen-bm86x/protocol.c
Build: Include <config.h> first in all source files
[libsigrok.git] / src / hardware / brymen-bm86x / protocol.c
index 4de8a74cf6bdc7ffd6e4b4124d32292544e1be00..2840696f8127f8a84e9f1f664f468ba440d6eeba 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <string.h>
 #include <math.h>
 #include "protocol.h"
@@ -257,7 +258,7 @@ static int brymen_bm86x_send_command(const struct sr_dev_inst *sdi)
        }
 
        if (ret != sizeof(buf)) {
-               sr_err("Short packet: sent %d/%ld bytes.", ret, sizeof(buf));
+               sr_err("Short packet: sent %d/%zu bytes.", ret, sizeof(buf));
                return SR_ERR;
        }
 
@@ -293,7 +294,7 @@ static int brymen_bm86x_read_interrupt(const struct sr_dev_inst *sdi)
        }
 
        if (transferred != sizeof(buf)) {
-               sr_err("Short packet: received %d/%d bytes.", transferred, sizeof(buf));
+               sr_err("Short packet: received %d/%zu bytes.", transferred, sizeof(buf));
                return SR_ERR;
        }