Skip to content

Instantly share code, notes, and snippets.

@SaveTheRbtz
Created October 1, 2013 21:54
Show Gist options
  • Save SaveTheRbtz/6785734 to your computer and use it in GitHub Desktop.
Save SaveTheRbtz/6785734 to your computer and use it in GitHub Desktop.
Do not return value from `void` function
diff --git a/libowfat-0.29/CAS.h b/libowfat-0.29/CAS.h
index 27b3219..1308050 100644
--- a/libowfat-0.29/CAS.h
+++ b/libowfat-0.29/CAS.h
@@ -53,7 +53,7 @@ static inline size_t atomic_add_return(size_t* x,size_t val) {
/* *x += val; */
static inline void atomic_add(size_t* x,size_t val) {
#ifdef USE_BUILTINS
- return __sync_add_and_fetch(x,val);
+ __sync_add_and_fetch(x,val);
#elif defined(__i386__)
asm volatile ("lock; addl %1, %0" : "+m" (*x) : "ir" (val) );
#elif defined(__x86_64__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment