File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
ruby/ext/google/protobuf_c Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1016,6 +1016,7 @@ UPB_INLINE uint8_t _upb_Xsan_NextTag(upb_Xsan *xsan) {
10161016 }
10171017 return xsan->state;
10181018#else
1019+ UPB_UNUSED(xsan);
10191020 return 0;
10201021#endif
10211022}
@@ -1032,13 +1033,16 @@ UPB_INLINE uint8_t UPB_PRIVATE(_upb_Xsan_GetTag)(const void *addr) {
10321033#if UPB_HWASAN
10331034 return __hwasan_get_tag_from_pointer(addr);
10341035#else
1036+ UPB_UNUSED(addr);
10351037 return 0;
10361038#endif
10371039}
10381040
10391041UPB_INLINE void UPB_PRIVATE(upb_Xsan_Init)(upb_Xsan *xsan) {
10401042#if UPB_HWASAN || UPB_TSAN
10411043 xsan->state = 0;
1044+ #else
1045+ UPB_UNUSED(xsan);
10421046#endif
10431047}
10441048
@@ -1047,6 +1051,9 @@ UPB_INLINE void UPB_PRIVATE(upb_Xsan_MarkInitialized)(void* addr, size_t size) {
10471051 if (size) {
10481052 __msan_unpoison(addr, size);
10491053 }
1054+ #else
1055+ UPB_UNUSED(addr);
1056+ UPB_UNUSED(size);
10501057#endif
10511058}
10521059
@@ -1059,6 +1066,9 @@ UPB_INLINE void UPB_PRIVATE(upb_Xsan_PoisonRegion)(const void *addr,
10591066 __asan_poison_memory_region(addr, size);
10601067#elif UPB_HWASAN
10611068 __hwasan_tag_memory(addr, UPB_HWASAN_POISON_TAG, UPB_ALIGN_MALLOC(size));
1069+ #else
1070+ UPB_UNUSED(addr);
1071+ UPB_UNUSED(size);
10621072#endif
10631073}
10641074
@@ -1136,13 +1146,17 @@ UPB_INLINE void UPB_PRIVATE(upb_Xsan_AccessReadOnly)(upb_Xsan *xsan) {
11361146#if UPB_TSAN
11371147 // For performance we avoid using a volatile variable.
11381148 __asm__ volatile("" ::"r"(xsan->state));
1149+ #else
1150+ UPB_UNUSED(xsan);
11391151#endif
11401152}
11411153
11421154UPB_INLINE void UPB_PRIVATE(upb_Xsan_AccessReadWrite)(upb_Xsan *xsan) {
11431155#if UPB_TSAN
11441156 // For performance we avoid using a volatile variable.
11451157 __asm__ volatile("" : "+r"(xsan->state));
1158+ #else
1159+ UPB_UNUSED(xsan);
11461160#endif
11471161}
11481162
Original file line number Diff line number Diff line change @@ -1018,6 +1018,7 @@ UPB_INLINE uint8_t _upb_Xsan_NextTag(upb_Xsan *xsan) {
10181018 }
10191019 return xsan->state;
10201020#else
1021+ UPB_UNUSED(xsan);
10211022 return 0;
10221023#endif
10231024}
@@ -1034,13 +1035,16 @@ UPB_INLINE uint8_t UPB_PRIVATE(_upb_Xsan_GetTag)(const void *addr) {
10341035#if UPB_HWASAN
10351036 return __hwasan_get_tag_from_pointer(addr);
10361037#else
1038+ UPB_UNUSED(addr);
10371039 return 0;
10381040#endif
10391041}
10401042
10411043UPB_INLINE void UPB_PRIVATE(upb_Xsan_Init)(upb_Xsan *xsan) {
10421044#if UPB_HWASAN || UPB_TSAN
10431045 xsan->state = 0;
1046+ #else
1047+ UPB_UNUSED(xsan);
10441048#endif
10451049}
10461050
@@ -1049,6 +1053,9 @@ UPB_INLINE void UPB_PRIVATE(upb_Xsan_MarkInitialized)(void* addr, size_t size) {
10491053 if (size) {
10501054 __msan_unpoison(addr, size);
10511055 }
1056+ #else
1057+ UPB_UNUSED(addr);
1058+ UPB_UNUSED(size);
10521059#endif
10531060}
10541061
@@ -1061,6 +1068,9 @@ UPB_INLINE void UPB_PRIVATE(upb_Xsan_PoisonRegion)(const void *addr,
10611068 __asan_poison_memory_region(addr, size);
10621069#elif UPB_HWASAN
10631070 __hwasan_tag_memory(addr, UPB_HWASAN_POISON_TAG, UPB_ALIGN_MALLOC(size));
1071+ #else
1072+ UPB_UNUSED(addr);
1073+ UPB_UNUSED(size);
10641074#endif
10651075}
10661076
@@ -1138,13 +1148,17 @@ UPB_INLINE void UPB_PRIVATE(upb_Xsan_AccessReadOnly)(upb_Xsan *xsan) {
11381148#if UPB_TSAN
11391149 // For performance we avoid using a volatile variable.
11401150 __asm__ volatile("" ::"r"(xsan->state));
1151+ #else
1152+ UPB_UNUSED(xsan);
11411153#endif
11421154}
11431155
11441156UPB_INLINE void UPB_PRIVATE(upb_Xsan_AccessReadWrite)(upb_Xsan *xsan) {
11451157#if UPB_TSAN
11461158 // For performance we avoid using a volatile variable.
11471159 __asm__ volatile("" : "+r"(xsan->state));
1160+ #else
1161+ UPB_UNUSED(xsan);
11481162#endif
11491163}
11501164
You can’t perform that action at this time.
0 commit comments