rm5248 commented on a change in pull request #86:
URL: https://github.com/apache/logging-log4cxx/pull/86#discussion_r773494809



##########
File path: src/main/include/log4cxx/log4cxx.h.in
##########
@@ -29,10 +29,14 @@
 #define LOG4CXX_VERSION_MINOR @log4cxx_VERSION_MINOR@
 #define LOG4CXX_VERSION_PATCH @log4cxx_VERSION_PATCH@
 #define LOG4CXX_VERSION_TWEAK @log4cxx_VERSION_TWEAK@
-#define LOG4CXX_MAKE_VERSION(major, minor, patch, tweak) ((major << 24) |\
-       (minor << 16) |\
-       (patch << 8) |\
+#define LOG4CXX_MAKE_VERSION(major, minor, patch, tweak) (((major) << 24) |\
+       ((minor) << 16) |\
+       ((patch) << 8) |\
        (tweak) )
+#define LOG4CXX_VERSION_GET_MAJOR(version) (((version) >> 24) & 0xFF)
+#define LOG4CXX_VERSION_GET_MINOR(version) (((version) >> 16) & 0xFF)
+#define LOG4CXX_VERSION_GET_PATCH(version) (((version) >> 8) & 0xFF)
+#define LOG4CXX_VERSION_GET_TWEAK(version) ((version) & 0xFF)

Review comment:
       Maybe I'm missing something here, but what is the point of this?  If you 
do `LOG4CXX_VERSION_GET_MAJOR(LOG4CXX_VERSION)`, that will give you exactly the 
same as the `LOG4CXX_VERSION_MAJOR` macro, which is defined above.




-- 
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