mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
r300/compiler: Move declaration before code.
Fixes this GCC warning on linux-x86 build.
radeon_remove_constants.c: In function ‘rc_remove_unused_constants’:
radeon_remove_constants.c💯 warning: ISO C90 forbids mixed declarations and code
This commit is contained in:
parent
4cd4fd37aa
commit
0d0273142a
1 changed files with 2 additions and 1 deletions
|
|
@ -68,6 +68,7 @@ void rc_remove_unused_constants(struct radeon_compiler *c, void *user)
|
|||
unsigned are_externals_remapped = 0;
|
||||
struct rc_constant *constants = c->Program.Constants.Constants;
|
||||
struct mark_used_data d;
|
||||
unsigned new_count;
|
||||
|
||||
if (!c->Program.Constants.Count) {
|
||||
*out_remap_table = NULL;
|
||||
|
|
@ -97,7 +98,7 @@ void rc_remove_unused_constants(struct radeon_compiler *c, void *user)
|
|||
* This pass removes unused constants simply by overwriting them by other constants. */
|
||||
remap_table = malloc(c->Program.Constants.Count * sizeof(unsigned));
|
||||
inv_remap_table = malloc(c->Program.Constants.Count * sizeof(unsigned));
|
||||
unsigned new_count = 0;
|
||||
new_count = 0;
|
||||
|
||||
for (unsigned i = 0; i < c->Program.Constants.Count; i++) {
|
||||
if (const_used[i]) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue