Skip to content

Commit

Permalink
Audio: MFCC: Fix sparse and 64 bit build issues
Browse files Browse the repository at this point in the history
The comp_err() trace in mfcc_init() causes an error:

sof/src/audio/mfcc/mfcc.c: In function 'mfcc_init':
sof/src/include/sof/audio/component.h:160:20:
  error: format '%u' expects argument of type 'unsigned int',
  but argument 4 has type 'size_t' {aka 'long unsigned int'}
  [-Werror=format=]

The sparse error is
sof/src/include/sof/audio/mfcc/mfcc_comp.h:128:27:
  error: dubious one-bit signed bitfield

Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu committed Aug 22, 2024
1 parent 1009ba7 commit 33709f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/audio/mfcc/mfcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static int mfcc_init(struct processing_module *mod)

/* Check first that configuration blob size is sane */
if (bs > SOF_MFCC_CONFIG_MAX_SIZE) {
comp_err(dev, "mfcc_init() error: configuration blob size %u exceeds %d",
comp_err(dev, "mfcc_init() error: configuration blob size %lu exceeds %d",
bs, SOF_MFCC_CONFIG_MAX_SIZE);
return -EINVAL;
}
Expand Down
4 changes: 2 additions & 2 deletions src/include/sof/audio/mfcc/mfcc_comp.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ struct mfcc_state {
int low_freq;
int high_freq;
int sample_rate;
int waiting_fill:1; /**< booleans */
int prev_samples_valid:1;
bool waiting_fill:1; /**< booleans */
bool prev_samples_valid:1;
size_t sample_buffers_size; /**< bytes */
};

Expand Down

0 comments on commit 33709f1

Please sign in to comment.