Skip to content

Commit 9453183

Browse files
Andrey Borisovichkv2019i
authored andcommitted
Fixed warnings issued by new xt-clang compiler
New Xtensa xt-clang driver issues new warnings that were not present before when using xt-xcc driver. Fixed warnings related to enum cast to other enum by removing "frame_fmt" local variable assignment in the selector.c file. Assignment was not needed in the build_config function body, as the variable "frame_fmt" is passed in the next line to audio_stream_fmt_conversion function, that writes to this variable as output. Silenced warnings related to C/C++ interoperability. Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
1 parent b70ae5f commit 9453183

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/audio/selector/selector.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,14 +579,12 @@ static void build_config(struct comp_data *cd, struct module_config *cfg)
579579
enum sof_ipc_frame __sparse_cache frame_fmt, valid_fmt;
580580
int i;
581581

582-
frame_fmt = cfg->base_cfg.audio_fmt.depth;
583582
audio_stream_fmt_conversion(cfg->base_cfg.audio_fmt.depth,
584583
cfg->base_cfg.audio_fmt.valid_bit_depth,
585584
&frame_fmt, &valid_fmt,
586585
cfg->base_cfg.audio_fmt.s_type);
587586
cd->source_format = frame_fmt;
588587

589-
frame_fmt = cd->sink_format;
590588
audio_stream_fmt_conversion(cd->output_format.depth,
591589
cd->output_format.valid_bit_depth,
592590
&frame_fmt, &valid_fmt,

src/include/sof/audio/module_adapter/iadk/system_service.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313

1414
#include <stdint.h>
1515

16+
#ifdef __clang__
17+
#pragma clang diagnostic push
18+
#pragma clang diagnostic ignored "-Wextern-c-compat"
19+
#endif //__clang__
20+
1621
#ifdef __cplusplus
1722
extern "C" {
1823
#endif
@@ -233,4 +238,8 @@ struct SystemService : public AdspSystemService {};
233238
}
234239
#endif
235240

241+
#ifdef __clang__
242+
#pragma clang diagnostic pop // ignored "-Wextern-c-compat"
243+
#endif //__clang__
244+
236245
#endif /* _ADSP_SYSTEM_SERVICE_H_ */

0 commit comments

Comments
 (0)