diff options
author | Kai Wasserbäch <[email protected]> | 2019-09-28 18:58:57 +0200 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-11-07 11:32:55 +1100 |
commit | ddc588ff71ef9fdb87ef476f91bc716383dbeb77 (patch) | |
tree | ccbb14a5ea6b62856074e46d8a77b7f51cd46836 /src/intel/common | |
parent | acfea09dbd795fdf42cb5543a922e0cb90aa4969 (diff) |
intel/gen_decoder: Fix unused-but-set-variable warning
This commit fixes the following warning:
../src/intel/common/gen_decoder.c: In function ‘gen_spec_load_from_path’:
../src/intel/common/gen_decoder.c:741:11: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
741 | size_t len, filename_len = strlen(path) + 20;
| ^~~
Signed-off-by: Kai Wasserbäch <[email protected]>
Acked-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/common')
-rw-r--r-- | src/intel/common/gen_decoder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index 69d7de0824e..97e8f168228 100644 --- a/src/intel/common/gen_decoder.c +++ b/src/intel/common/gen_decoder.c @@ -738,10 +738,10 @@ struct gen_spec * gen_spec_load_from_path(const struct gen_device_info *devinfo, const char *path) { - size_t len, filename_len = strlen(path) + 20; + size_t filename_len = strlen(path) + 20; char *filename = malloc(filename_len); - len = snprintf(filename, filename_len, "%s/gen%i.xml", + ASSERTED size_t len = snprintf(filename, filename_len, "%s/gen%i.xml", path, devinfo_to_gen(devinfo, false)); assert(len < filename_len); |