SolidWallOfCode commented on code in PR #9183:
URL: https://github.com/apache/trafficserver/pull/9183#discussion_r1122220143


##########
src/tscore/ink_queue.cc:
##########
@@ -94,6 +94,12 @@ static const ink_freelist_ops *default_ops = &freelist_ops;
 static ink_freelist_list *freelists                = nullptr;
 static const ink_freelist_ops *freelist_global_ops = default_ops;
 
+inline void
+dummy_forced_read(void *mem)
+{
+  static_cast<void>(*const_cast<int volatile *>(reinterpret_cast<int *>(mem)));

Review Comment:
   Use `[[maybe_unused]]` instead of `static_cast<void>()`?
   
   Also, you can `static_cast` to `int *` because it's a `void *`.
   
   Finally, `force_read` might be a better name. There's no longer a dummy 
variable involved



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to