summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2022-06-21 01:31:20 +0200
committerGitHub <noreply@github.com>2022-06-21 09:31:20 +1000
commit6a81cb44f2ec10472fd58496ad18f812798cc275 (patch)
tree46af702050f846dac02e7f205ee06cc5f77449c9
parent2703ecc9e98819ab4d13bdb6da6e0d02ee840d86 (diff)
downloadqmk_firmware-6a81cb44f2ec10472fd58496ad18f812798cc275.tar.gz
qmk_firmware-6a81cb44f2ec10472fd58496ad18f812798cc275.zip
[Fix] Fix compilation warning for non-split keebs after #17423 (#17439)
-rw-r--r--platforms/synchronization_util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/platforms/synchronization_util.h b/platforms/synchronization_util.h
index 81ce074cac..59933945c3 100644
--- a/platforms/synchronization_util.h
+++ b/platforms/synchronization_util.h
@@ -9,8 +9,10 @@ void split_shared_memory_lock(void);
void split_shared_memory_unlock(void);
# endif
#else
+# if defined(SPLIT_KEYBOARD)
inline void split_shared_memory_lock(void){};
inline void split_shared_memory_unlock(void){};
+# endif
#endif
/* GCCs cleanup attribute expects a function with one parameter, which is a
@@ -31,6 +33,7 @@ inline void split_shared_memory_unlock(void){};
* lock_autounlock function macro */
#define QMK_DECLARE_AUTOUNLOCK_CALL(prefix) unsigned prefix##_guard __attribute__((unused, cleanup(prefix##_autounlock_unlock_helper))) = prefix##_autounlock_lock_helper
+#if defined(SPLIT_KEYBOARD)
QMK_DECLARE_AUTOUNLOCK_HELPERS(split_shared_memory)
/**
@@ -41,4 +44,5 @@ QMK_DECLARE_AUTOUNLOCK_HELPERS(split_shared_memory)
* `split_shared_memory_lock_autounlock()` is called in goes out of scope i.e.
* when the enclosing function returns.
*/
-#define split_shared_memory_lock_autounlock QMK_DECLARE_AUTOUNLOCK_CALL(split_shared_memory)
+# define split_shared_memory_lock_autounlock QMK_DECLARE_AUTOUNLOCK_CALL(split_shared_memory)
+#endif