fix spi_set_format() -Wnull-dereference when compiling with -Os
This commit is contained in:
11
.github/workflows/build_util.yml
vendored
11
.github/workflows/build_util.yml
vendored
@@ -58,11 +58,10 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: inputs.toolchain != 'esp-idf'
|
|
||||||
run: |
|
|
||||||
python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
|
|
||||||
|
|
||||||
- name: Build using ESP-IDF docker
|
|
||||||
if: inputs.toolchain == 'esp-idf'
|
|
||||||
run: |
|
run: |
|
||||||
|
if [ "${{ inputs.toolchain }}" == "esp-idf" ]; then
|
||||||
docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_version }} python3 tools/build.py ${{ matrix.arg }}
|
docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_version }} python3 tools/build.py ${{ matrix.arg }}
|
||||||
|
else
|
||||||
|
python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
@@ -275,7 +275,15 @@ static void max3421_init(void) {
|
|||||||
gpio_set_function(MAX3421_SCK_PIN, GPIO_FUNC_SPI);
|
gpio_set_function(MAX3421_SCK_PIN, GPIO_FUNC_SPI);
|
||||||
gpio_set_function(MAX3421_MOSI_PIN, GPIO_FUNC_SPI);
|
gpio_set_function(MAX3421_MOSI_PIN, GPIO_FUNC_SPI);
|
||||||
gpio_set_function(MAX3421_MISO_PIN, GPIO_FUNC_SPI);
|
gpio_set_function(MAX3421_MISO_PIN, GPIO_FUNC_SPI);
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wnull-dereference"
|
||||||
|
#endif
|
||||||
spi_set_format(MAX3421_SPI, 8, SPI_CPOL_0, SPI_CPHA_0, SPI_MSB_FIRST);
|
spi_set_format(MAX3421_SPI, 8, SPI_CPOL_0, SPI_CPHA_0, SPI_MSB_FIRST);
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//// API to enable/disable MAX3421 INTR pin interrupt
|
//// API to enable/disable MAX3421 INTR pin interrupt
|
||||||
|
Reference in New Issue
Block a user