Skip to content

[BUG] lpcxpresso-lpc54628/nsh fails to build: 'priv' is used uninitialized (spin_lock_irqsave) #15679

Description

@lupyuen

Description / Steps to reproduce the issue

lpcxpresso-lpc54628:nsh fails to build with a Spin Lock Error:

https://github.com/NuttX/nuttx/actions/runs/12935919991/job/36080453959#step:7:570

Configuration/Tool: lpcxpresso-lpc54628/nsh,CONFIG_ARM_TOOLCHAIN_CLANG
chip/lpc54_i2c_master.c: In function 'lpc54_i2cbus_initialize':
Error: chip/lpc54_i2c_master.c:917:29: error: 'priv' is used uninitialized [-Werror=uninitialized]
  917 |   flags = spin_lock_irqsave(&priv->spinlock);
      |                             ^~~~~~~~~~~~~~~
chip/lpc54_i2c_master.c:911:26: note: 'priv' was declared here
  911 |   struct lpc54_i2cdev_s *priv;
      |                          ^~~~

NuttX Build History says that the Breaking Commit is somewhere between these 2 commits:

https://nuttx-dashboard.org/d/fe2q876wubc3kc/nuttx-build-history?from=now-7d&to=now&timezone=browser&var-arch=$__all&var-subarch=$__all&var-board=lpcxpresso-lpc54628&var-config=nsh&var-group=$__all&var-Filters=

Image

NuttX Dashboard shows other similar errors:

https://nuttx-dashboard.org/d/fe2bqg6uk7nr4a/build-logs-from-nuttx-build-farm?from=now-2d&to=now&timezone=browser&var-arch=$__all&var-subarch=$__all&var-board=$__all&var-config=$__all&var-group=$__all&var-Filters=user%7C%3D%7CNuttX

Image

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Ubuntu LTS at GitHub CI

NuttX Version

master

Issue Architecture

[Arch: arm]

Issue Area

[Area: Board support]

Host information

No response

Verification

  • I have verified before submitting the report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arch: armIssues related to ARM (32-bit) architectureArea: Board supportBoard support issuesOS: LinuxIssues related to Linux (building system, etc)Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions