You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by GitBox <gi...@apache.org> on 2020/07/22 12:13:43 UTC

[GitHub] [incubator-datasketches-cpp] gaborkaszab opened a new issue #165: Remove c-style const casts in kll/ and common/ directories

gaborkaszab opened a new issue #165:
URL: https://github.com/apache/incubator-datasketches-cpp/issues/165


   I recently started integrating the Apache DataSketches C++ library into Apache Impala and our build system (with clang tidy) found some casts where the const-ness is casted away using c-style casts. The best practice would be to use C++ style casts like const_cast in this case instead.
   
   The code popping up in the report:
   1)
   https://github.com/apache/incubator-datasketches-cpp/blob/762904bb168d44846c1fe4f178998c9a8a57ccba/common/include/serde.hpp#L53
   This can be a reinterpret_cast<char*>(const_cast<T*>(items))
   2)
   https://github.com/apache/incubator-datasketches-cpp/blob/762904bb168d44846c1fe4f178998c9a8a57ccba/kll/include/kll_sketch_impl.hpp#L381
   Note, fixing this will result that 2 lines below will pop up in the report, fixing that will reveal the same error another 2 lines below, and so on. Removeing the const-ness of the local variables would solve the issue.
   
   This ticket focuses only on the kll/ and common/ folders of the C++ library as my work was only touching those folders so I've only run the report on them. And this ticket covers only those c-style casts where the const-ness is lost during the cast


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [incubator-datasketches-cpp] jmalkin closed issue #165: Remove c-style const casts in kll/ and common/ directories

Posted by GitBox <gi...@apache.org>.
jmalkin closed issue #165:
URL: https://github.com/apache/incubator-datasketches-cpp/issues/165


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [incubator-datasketches-cpp] leerho commented on issue #165: Remove c-style const casts in kll/ and common/ directories

Posted by GitBox <gi...@apache.org>.
leerho commented on issue #165:
URL: https://github.com/apache/incubator-datasketches-cpp/issues/165#issuecomment-663666435


   @Jon Malkin <jo...@gmail.com>
   If we have more of these in other sketches, can we at least create a TODO
   item to track them down and fix those too?
   
   
   On Thu, Jul 23, 2020 at 11:45 PM Jon Malkin <no...@github.com>
   wrote:
   
   > Closed #165
   > <https://github.com/apache/incubator-datasketches-cpp/issues/165>.
   >
   > —
   > You are receiving this because you are subscribed to this thread.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/incubator-datasketches-cpp/issues/165#event-3582745292>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/ADCXRQSV4TPVHUUJO32HU7TR5EUWXANCNFSM4PEUTTQQ>
   > .
   >
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [incubator-datasketches-cpp] jmalkin commented on issue #165: Remove c-style const casts in kll/ and common/ directories

Posted by GitBox <gi...@apache.org>.
jmalkin commented on issue #165:
URL: https://github.com/apache/incubator-datasketches-cpp/issues/165#issuecomment-663371943


   We have more of these in other sketches, but this specific issue has been resolved by that merged PR.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org