From: Christopher Dykes Date: Sat, 15 Jul 2017 07:48:16 +0000 (-0700) Subject: Use long long for the 64-bit fingerprint table X-Git-Tag: v2017.07.17.00~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=eb0730c9e59c6596902e7b3ac2cfdc606449c2ae;p=folly.git Use long long for the 64-bit fingerprint table Summary: Because these are always 64-bit values. This hasn't actually been an issue but is the correct thing to do. Reviewed By: yfeldblum Differential Revision: D5425658 fbshipit-source-id: 5bc204b3d1af2c710bd8b1665211d2971ccf7be7 --- diff --git a/folly/build/GenerateFingerprintTables.cpp b/folly/build/GenerateFingerprintTables.cpp index e8e5b75f..da21e171 100644 --- a/folly/build/GenerateFingerprintTables.cpp +++ b/folly/build/GenerateFingerprintTables.cpp @@ -89,7 +89,7 @@ void computeTables(FILE* file, const FingerprintPolynomial& poly) { "const uint64_t FingerprintTable<%d>::poly[%d] = {", DEG+1, FingerprintPolynomial::size())); for (int j = 0; j < FingerprintPolynomial::size(); j++) { - CHECK_ERR(fprintf(file, "%s%" PRIu64 "LU", j ? ", " : "", poly_val[j])); + CHECK_ERR(fprintf(file, "%s%" PRIu64 "LLU", j ? ", " : "", poly_val[j])); } CHECK_ERR(fprintf(file, "};\n\n")); @@ -106,8 +106,8 @@ void computeTables(FILE* file, const FingerprintPolynomial& poly) { for (int x = 0; x < 256; x++) { CHECK_ERR(fprintf(file, " {")); for (int j = 0; j < FingerprintPolynomial::size(); j++) { - CHECK_ERR(fprintf( - file, "%s%" PRIu64 "LU", (j ? ", " : ""), table[i][x][j])); + CHECK_ERR( + fprintf(file, "%s%" PRIu64 "LLU", (j ? ", " : ""), table[i][x][j])); } CHECK_ERR(fprintf(file, "},\n")); }