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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user