util: initialize float-array with float-literals
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 20 Sep 2019 14:04:06 +0000 (16:04 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 14 Jan 2020 11:00:27 +0000 (12:00 +0100)
We currently initialize this float-array with double-literals. Some
compilers generate warnings for this, so let's switch these to
float-literals instead.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/util/format_srgb.py

index 0b3b5611fc96ac24b2af8b2e42f8593c147f9c3c..98fa1c48cf315e3238d55349e8d4056f8e022fa7 100644 (file)
@@ -62,7 +62,7 @@ def generate_srgb_tables():
     print('util_format_srgb_8unorm_to_linear_float_table[256] = {')
     for j in range(0, 256, 4):
         print('   ', end=' ')
-        print(' '.join(['%.7e,' % srgb_to_linear(i / 255.0) for i in range(j, j + 4)]))
+        print(' '.join(['%.7ef,' % srgb_to_linear(i / 255.0) for i in range(j, j + 4)]))
     print('};')
     print()
     print('const uint8_t')