Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compile error #15681

Closed
wants to merge 1 commit into from
Closed

fix compile error #15681

wants to merge 1 commit into from

Conversation

hujun260
Copy link
Contributor

Summary

fix compile error
CC: socket/listen.c chip/lpc17_40_i2c.c: In function 'lpc17_40_i2cbus_initialize': chip/lpc17_40_i2c.c:534:29: warning: 'priv' is used uninitialized [-Wuninitialized]
534 | flags = spin_lock_irqsave(&priv->spinlock);
| ^~~~~~~~~~~~~~~
chip/lpc17_40_i2c.c:529:29: note: 'priv' was declared here
529 | struct lpc17_40_i2cdev_s *priv;
| ^~~~

Impact

none

Testing

ci

CC:  socket/listen.c chip/lpc17_40_i2c.c: In function 'lpc17_40_i2cbus_initialize':
chip/lpc17_40_i2c.c:534:29: warning: 'priv' is used uninitialized [-Wuninitialized]
  534 |   flags = spin_lock_irqsave(&priv->spinlock);
      |                             ^~~~~~~~~~~~~~~
chip/lpc17_40_i2c.c:529:29: note: 'priv' was declared here
  529 |   struct lpc17_40_i2cdev_s *priv;
      |                             ^~~~

Signed-off-by: hujun5 <[email protected]>
@github-actions github-actions bot added Arch: arm Issues related to ARM (32-bit) architecture Size: S The size of the change in this PR is small labels Jan 24, 2025
@nuttxpr
Copy link

nuttxpr commented Jan 24, 2025

[Experimental Bot, please feedback here]

No. The PR summary lacks crucial information. It states what the error is, but not why it occurs, how the change fixes it, or which functional part of the code is affected (i.e., I2C driver). The Impact section is too brief and doesn't address all the points. The Testing section doesn't provide any actual logs or specify the host/target environments used for testing. Simply stating "ci" isn't sufficient. A proper "before" and "after" demonstration of the fix is necessary.

@wangzhi-art
Copy link
Contributor

wangzhi-art commented Jan 24, 2025

Submitting this patch alone will result in a CI error. Since there are other issues that need to be resolved, I have submitted the other issues together with this patch, and this pull request can be closed. #15683

@hujun260 hujun260 closed this Jan 24, 2025
@hujun260 hujun260 deleted the apache_70 branch January 24, 2025 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: arm Issues related to ARM (32-bit) architecture Size: S The size of the change in this PR is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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