Skip to content

core: provide safe implementations of CV_XADD() only - #16125

Merged
opencv-pushbot merged 1 commit into
opencv:3.4from
alalek:core_safe_xadd
Dec 11, 2019
Merged

opencv-pushbot merged 1 commit into
opencv:3.4from
alalek:core_safe_xadd

Conversation

@alalek

@alalek alalek commented Dec 11, 2019

Copy link
Copy Markdown
Member

relates #16123

@mshabunin mshabunin self-assigned this Dec 11, 2019
@opencv-pushbot
opencv-pushbot merged commit 4168480 into opencv:3.4 Dec 11, 2019
@alalek alalek mentioned this pull request Dec 11, 2019
@zchrissirhcz

Copy link
Copy Markdown
Contributor

Hi, @alalek
I'm late here for this issue. I wonder if the modified line, missing return type? i.e.

Current:

CV_INLINE CV_XADD(int* addr, int delta) { int tmp = *addr; *addr += delta; return tmp; }

Should be:

CV_INLINE int CV_XADD(int* addr, int delta) { int tmp = *addr; *addr += delta; return tmp; }

CV_INLINE CV_XADD(int* addr, int delta) { int tmp = *addr; *addr += delta; return tmp; }

SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants