summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/formats.c
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-06-11 13:32:21 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-06-11 13:35:23 +0100
commit9fed4f9bf5146af1fcd093422b39353845f2267a (patch)
treef6d25fef9b6f420a5f814626c3ff732404279292 /src/mesa/main/formats.c
parent0f1fe649b7fdfb3ab8c7b14e642bc0e3831fc092 (diff)
downloadexternal_mesa3d-9fed4f9bf5146af1fcd093422b39353845f2267a.zip
external_mesa3d-9fed4f9bf5146af1fcd093422b39353845f2267a.tar.gz
external_mesa3d-9fed4f9bf5146af1fcd093422b39353845f2267a.tar.bz2
mesa/main: Don't use ONCE_FLAG_INIT as a r-value.
It should only be used as an initializer expression. Trivial, and fixes Windows builds. Nevertheless, overwriting an once_flag like this seems dangerous and should be revised.
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r--src/mesa/main/formats.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index f7c9402..baeb1bf 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -438,7 +438,8 @@ _mesa_format_from_array_format(uint32_t array_format)
call_once(&format_array_format_table_exists, format_array_format_table_init);
if (!format_array_format_table) {
- format_array_format_table_exists = ONCE_FLAG_INIT;
+ static const once_flag once_flag_init = ONCE_FLAG_INIT;
+ format_array_format_table_exists = once_flag_init;
return MESA_FORMAT_NONE;
}