]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
mcclellan: fix printf format specifiers
authorJustin Viiret <justin.viiret@intel.com>
Mon, 28 Nov 2016 05:19:42 +0000 (16:19 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Fri, 2 Dec 2016 00:35:52 +0000 (11:35 +1100)
src/nfa/mcclellan.c
src/nfa/mcclellan_common_impl.h

index 896c0703ceb3c4b7cccccab2c4a57cb8bf7b6814..63f5f5350d92b860d4e3d416b3cf677c19d3457b 100644 (file)
@@ -145,7 +145,7 @@ u32 doNormal16(const struct mcclellan *m, const u8 **c_inout, const u8 *end,
         } else {
             const char *sherman_state
                 = findShermanState(m, sherman_base_offset, sherman_base, s);
-            DEBUG_PRINTF("doing sherman (%hu)\n", s);
+            DEBUG_PRINTF("doing sherman (%u)\n", s);
             s = doSherman16(sherman_state, cprime, succ_table, as);
         }
 
@@ -190,7 +190,7 @@ char mcclellanExec16_i(const struct mcclellan *m, u32 *state, const u8 *buf,
     u32 cached_accept_id = 0;
     u32 cached_accept_state = 0;
 
-    DEBUG_PRINTF("s: %hu, len %zu\n", s, len);
+    DEBUG_PRINTF("s: %u, len %zu\n", s, len);
 
     const u8 *min_accel_offset = c;
     if (!m->has_accel || len < ACCEL_MIN_LEN) {
@@ -354,7 +354,7 @@ u32 doNormal8(const struct mcclellan *m, const u8 **c_inout, const u8 *end,
                      ourisprint(*c) ? *c : '?', cprime);
         s = succ_table[(s << as) + cprime];
 
-        DEBUG_PRINTF("s: %hhu\n", s);
+        DEBUG_PRINTF("s: %u\n", s);
         c++;
         if (do_accel) {
             if (s >= accel_limit) {
@@ -621,7 +621,7 @@ char nfaExecMcClellan16_Q2i(const struct NFA *n, u64a offset, const u8 *buffer,
         if (mode == STOP_AT_MATCH && final_look != cur_buf + local_ep) {
             DEBUG_PRINTF("this is as far as we go\n");
             assert(q->cur);
-            DEBUG_PRINTF("state %hu final_look %zd\n", s, final_look - cur_buf);
+            DEBUG_PRINTF("state %u final_look %zd\n", s, final_look - cur_buf);
             q->cur--;
             q->items[q->cur].type = MQE_START;
             q->items[q->cur].location = final_look - cur_buf + 1; /* due to
@@ -930,7 +930,7 @@ char nfaExecMcClellan16_reportCurrent(const struct NFA *n, struct mq *q) {
     u8 single = m->flags & MCCLELLAN_FLAG_SINGLE;
     u64a offset = q_cur_offset(q);
     assert(q_cur_type(q) == MQE_START);
-    DEBUG_PRINTF("state %hu\n", s);
+    DEBUG_PRINTF("state %u\n", s);
     assert(s);
 
     if (aux->accept) {
index 751ef05af117aad09c84d7e4ba02325637d92bdd..be130715945f8e6ff1ad8a51b9f266c27a886d93 100644 (file)
@@ -46,7 +46,7 @@ static really_inline
 u32 mcclellanEnableStarts(const struct mcclellan *m, u32 s) {
     const struct mstate_aux *aux = get_aux(m, s);
 
-    DEBUG_PRINTF("enabling starts %hu->%hu\n", s, aux->top);
+    DEBUG_PRINTF("enabling starts %u->%hu\n", s, aux->top);
     return aux->top;
 }