Skip to content

Commit f364b12

Browse files
committed
Fix conversion warnings in build_file
+ constexpr
1 parent fed7018 commit f364b12

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/msgs/build_file.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include <unistd.h>
4141
#endif
4242

43-
const int max_levels = 4;
43+
constexpr int max_levels = 4;
4444
typedef msgnod* msgnod_ptr_array[max_levels];
4545

4646
static char* copy_terminate(char* dest, const char* src, size_t bufsize);
@@ -342,7 +342,7 @@ static USHORT do_msgs(const TEXT* filename)
342342

343343
if (leaf_node->msgrec_code <= prior_code && prior_code != 0)
344344
{
345-
fprintf(stderr, "Out of order messages (src/include/firebird/impl/msg/*.h): %d x %d\n",
345+
fprintf(stderr, "Out of order messages (src/include/firebird/impl/msg/*.h): %" ULONGFORMAT " x %" ULONGFORMAT "\n",
346346
leaf_node->msgrec_code, prior_code);
347347
exit(FINI_ERROR);
348348
}
@@ -465,7 +465,7 @@ static SLONG write_bucket(const msgnod* bucket, USHORT length)
465465
exit(FINI_ERROR);
466466
}
467467

468-
const SLONG zero_bytes = 0;
468+
constexpr SLONG zero_bytes = 0;
469469
n = write(global_file, &zero_bytes, padded_length - length);
470470
if (n == -1)
471471
{

0 commit comments

Comments
 (0)