xiph / xiph/opus

v1.5.2 compile warnings

Open
#338 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
3.3k
Forks
808
PR merge metrics
No merged PRs in 30d

Description

Just tried building v1.5.2 on macOS 13.6.6 (Xcode 14.2) and it seemed to build fine. Just got the following warnings:

  CC       dnn/freq.lo
silk/x86/NSQ_del_dec_avx2.c:961:26: warning: cast from 'opus_int32 *' (aka 'int *') to '__m128i *' increases required alignment from 4 to 16 [-Wcast-align]
        _mm_storeu_si128((__m128i*)&x_sc_Q10[i], silk_cvtepi64_epi32_high(x));
                         ^~~~~~~~~~~~~~~~~~~~~~
silk/x86/NSQ_del_dec_avx2.c:988:30: warning: cast from 'opus_int32 *' (aka 'int *') to '__m128i *' increases required alignment from 4 to 16 [-Wcast-align]
            _mm_storeu_si128((__m128i*)p, silk_mm_smulww_epi32(_mm_loadu_si128((__m128i*)p), gain_adj_Q16));
                             ^~~~~~~~~~~
silk/x86/NSQ_del_dec_avx2.c:988:80: warning: cast from 'opus_int32 *' (aka 'int *') to '__m128i *' increases required alignment from 4 to 16 [-Wcast-align]
            _mm_storeu_si128((__m128i*)p, silk_mm_smulww_epi32(_mm_loadu_si128((__m128i*)p), gain_adj_Q16));
                                                                               ^~~~~~~~~~~
silk/x86/NSQ_del_dec_avx2.c:1043:62: warning: cast from 'const opus_int16 *' (aka 'const short *') to '__m128i *' increases required alignment from 2 to 16 [-Wcast-align]
        __m256i in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&in_ptr[-8]));
                                                             ^~~~~~~~~~~~~~~~~~~~~
silk/x86/NSQ_del_dec_avx2.c:1044:62: warning: cast from 'const opus_int16 *' (aka 'const short *') to '__m128i *' increases required alignment from 2 to 16 [-Wcast-align]
        __m256i B_v  = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&      B[0]));
                                                             ^~~~~~~~~~~~~~~~~~~~~
silk/x86/NSQ_del_dec_avx2.c:1048:58: warning: cast from 'const opus_int16 *' (aka 'const short *') to '__m128i *' increases required alignment from 2 to 16 [-Wcast-align]
            in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&in_ptr[-16]));
                                                         ^~~~~~~~~~~~~~~~~~~~~~
silk/x86/NSQ_del_dec_avx2.c:1049:58: warning: cast from 'const opus_int16 *' (aka 'const short *') to '__m128i *' increases required alignment from 2 to 16 [-Wcast-align]
            B_v  = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&B       [8]));
                                                         ^~~~~~~~~~~~~~~~~~~~~~
  CC       dnn/fargan.lo
7 warnings generated.

built using

#!/bin/sh -e

opus=opus-1.5.2
if ! [ -d local/lib ] ; then
    rm -fr local $opus
    tar xf $opus.tar
    cd $opus
    ./configure --prefix=$(realpath ..)/local \
        --enable-deep-plc \
        --enable-osce \
        --disable-doc \
        --disable-extra-programs
    make -j4
    make install
    cd ..
    rm -r $opus
fi

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the macOS build with the provided configure and make commands, then inspect silk/x86/NSQ_del_dec_avx2.c at the reported lines. Investigate the seven -Wcast-align warnings and verify that the same build no longer emits them when the work is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc, build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.