Changeset 05b59393 in mainline for uspace/drv/audio/sb16/dsp.c


Ignore:
Timestamp:
2017-10-04T18:02:14Z (7 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c9e88da
Parents:
0b2d369
Message:

Fix a couple of benign clang warnings.
No change in semantics.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/sb16/dsp.c

    r0b2d369 r05b59393  
    7575                [DSP_NO_BUFFER] = "NO BUFFER",
    7676        };
    77         if (state < ARRAY_SIZE(state_names))
     77        if ((size_t)state < ARRAY_SIZE(state_names))
    7878                return state_names[state];
    7979        return "UNKNOWN";
     
    144144{
    145145        dsp_write(dsp, SET_SAMPLING_RATE_OUTPUT);
    146         dsp_write(dsp, rate >> 8);
    147         dsp_write(dsp, rate & 0xff);
    148         ddf_log_verbose("Sampling rate: %hhx:%hhx.", rate >> 8, rate & 0xff);
     146        uint8_t rate_lo = rate & 0xff;
     147        uint8_t rate_hi = rate >> 8;
     148        dsp_write(dsp, rate_hi);
     149        dsp_write(dsp, rate_lo);
     150        ddf_log_verbose("Sampling rate: %hhx:%hhx.", rate_hi, rate_lo);
    149151}
    150152
     
    202204       
    203205        return ret;
    204 }
    205 
    206 static inline size_t sample_count(pcm_sample_format_t format, size_t byte_count)
    207 {
    208         return byte_count / pcm_sample_format_size(format);
    209206}
    210207
Note: See TracChangeset for help on using the changeset viewer.