/*#define DONT_FAIL_ON_CRC_ERROR*/
/*#define DEBUG*/
-#if __GNUC__ > 4 && !defined __OpenBSD__
-#define fallthrough __attribute__((fallthrough))
-#define unused __attribute__((unused))
-#else
-#define fallthrough
-#define unused
-#endif
-
#define rar5_min(a, b) (((a) > (b)) ? (b) : (a))
#define rar5_max(a, b) (((a) > (b)) ? (a) : (b))
#define rar5_countof(X) ((const ssize_t) (sizeof(X) / sizeof(*X)))
break;
case FILTER_E8:
- fallthrough;
+ /* fallthrough */
case FILTER_E8E9:
ret = run_e8e9_filter(rar, flt, flt->type == FILTER_E8E9);
break;
ret = parse_file_extra_htime(a, e, rar, &extra_data_size);
break;
case CRYPT:
- fallthrough;
+ /* fallthrough */
case VERSION_:
- fallthrough;
+ /* fallthrough */
case REDIR:
- fallthrough;
+ /* fallthrough */
case UOWNER:
- fallthrough;
+ /* fallthrough */
case SUBDATA:
- fallthrough;
+ /* fallthrough */
default:
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
"Unknown extra field in file/service block: 0x%02x",
case STORE:
return do_unstore_file(a, rar, buf, size, offset);
case FASTEST:
- fallthrough;
+ /* fallthrough */
case FAST:
- fallthrough;
+ /* fallthrough */
case NORMAL:
- fallthrough;
+ /* fallthrough */
case GOOD:
- fallthrough;
+ /* fallthrough */
case BEST:
return uncompress_file(a);
default:
(void) blake2sp_final(&rar->file.b2state, b2_buf, 32);
if(memcmp(&rar->file.blake2sp, b2_buf, 32) != 0) {
- DEBUG_CODE {
- printf("Checksum error: BLAKE2sp (%08x/%08x)\n",
- *(uint32_t*)rar->file.blake2sp,
- *(uint32_t*)b2_buf);
- }
-
#ifndef DONT_FAIL_ON_CRC_ERROR
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
"Checksum error: BLAKE2");
return ARCHIVE_FATAL;
#endif
- } else {
- DEBUG_CODE {
- printf("Checksum OK: BLAKE2sp (%08x/%08x)\n",
- *(uint32_t*)rar->file.blake2sp,
- *(uint32_t*)b2_buf);
- }
}
}
}