         if ((now - unique_mac[i].last_seen) > expiry) {
             // expired, overwrite it with the last one
             if (--unique_num > i) {
-                sprintf(text, "%10d: ", now);
+                sprintf(text, "%10ld: ", now);
                 Serial.print(text);
                 print_mac(unique_mac[i].mac);
                 sprintf(text, " expired: %d\n", unique_num);

            unsigned long now = millis();
            expire_mac(now, 60000);
            if (add_mac(now, addr2)) {
                sprintf(text, "%10d: ", now);
                Serial.print(text);
                print_mac(addr2);
                sprintf(text, " added: %d\n", unique_num);

        buf += 12;

        // read FC and DUR
        uint16_t fc = (buf[1] << 8) + buf[0];
        buf += 2;
        uint16_t dur = (buf[1] << 8) + buf[0];
        buf += 2;
        (void)dur;

        // get address1, address2, address3
        memcpy(addr1, buf, 6);
