freedreno/rnn: headergen2 warnings cleanup
authorRob Clark <robdclark@chromium.org>
Wed, 29 Jul 2020 18:25:13 +0000 (11:25 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jul 2020 19:32:51 +0000 (19:32 +0000)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6118>

src/freedreno/rnn/headergen2.c

index ee065b76a7c8a316556ab8a58303f9c1585a3bfc..d5a3eb7562ee98c671063336c54dd9bdf624e102 100644 (file)
@@ -179,11 +179,11 @@ static void printtypeinfo (struct rnntypeinfo *ti, struct rnnbitfield *bf,
                if ((ti->minvalid || ti->maxvalid || ti->alignvalid) && !no_asserts) {
                        fprintf(dst, "\tassert(1");
                        if (ti->minvalid)
-                               fprintf(dst, " && (val >= %lu)", ti->min);
+                               fprintf(dst, " && (val >= %"PRIu64")", ti->min);
                        if (ti->maxvalid)
-                               fprintf(dst, " && (val <= %lu)", ti->max);
+                               fprintf(dst, " && (val <= %"PRIu64")", ti->max);
                        if (ti->alignvalid)
-                               fprintf(dst, " && !(val %% %lu)", ti->align);
+                               fprintf(dst, " && !(val %% %"PRIu64")", ti->align);
                        fprintf(dst, ");\n");
                }
 
@@ -289,7 +289,7 @@ static void printdelem (struct rnndelem *elem, uint64_t offset) {
                                                        fprintf(dst, "%d", i);
                                                }
                                                if (elem->offsets) {
-                                                       fprintf(dst, ": return 0x%08lx;\n", elem->offsets[i]);
+                                                       fprintf(dst, ": return 0x%08"PRIx64";\n", elem->offsets[i]);
                                                } else {
                                                        fprintf(dst, ": return (%s);\n", elem->doffsets[i]);
                                                }
@@ -470,10 +470,10 @@ int main(int argc, char **argv) {
                                fprintf(dst, "enum %s {\n", db->enums[i]->name);
                        }
                        if (0xffff0000 & db->enums[i]->vals[j]->value)
-                               fprintf(dst, "\t%s = 0x%08lx,\n", db->enums[i]->vals[j]->name,
+                               fprintf(dst, "\t%s = 0x%08"PRIx64",\n", db->enums[i]->vals[j]->name,
                                                db->enums[i]->vals[j]->value);
                        else
-                               fprintf(dst, "\t%s = %lu,\n", db->enums[i]->vals[j]->name,
+                               fprintf(dst, "\t%s = %"PRIu64",\n", db->enums[i]->vals[j]->name,
                                                db->enums[i]->vals[j]->value);
                }
                if (dst) {