reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Weimer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (REEF-1333) Type cast warnings in our C++ code
Date Mon, 11 Apr 2016 21:36:25 GMT

    [ https://issues.apache.org/jira/browse/REEF-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15236018#comment-15236018
] 

Markus Weimer commented on REEF-1333:
-------------------------------------

All instances are in {{InteropReturnInfo.cpp}}. One case merely states

{code}
return ((int)obj) != 0;
{code}

This should probably be replaced with:

{code}
return obj != NULL;
{code}


and the other:

{code}
return (int)obj;
{code}

Not sure what the intent was here, as the return type of that function is indeed {{int}}.
[~beysims], can you help?


> Type cast warnings in our C++ code
> ----------------------------------
>
>                 Key: REEF-1333
>                 URL: https://issues.apache.org/jira/browse/REEF-1333
>             Project: REEF
>          Issue Type: Bug
>          Components: REEF Bridge, REEF.NET
>            Reporter: Markus Weimer
>
> The build currently produces the following warnings, which we should address:
> {noformat}
> "C:\src\reef\lang\cs\Org.Apache.REEF.sln" (default target) (1) ->
> "C:\src\reef\lang\cs\Org.Apache.REEF.Client\Org.Apache.REEF.Client.csproj" (default target)
(15) ->
> "C:\src\reef\lang\cs\Org.Apache.REEF.Bridge\Org.Apache.REEF.Bridge.vcxproj" (default
target) (17) ->
> (ClCompile target) ->
>   InteropReturnInfo.cpp(76): warning C4311: 'type cast': pointer truncation from 'jobject'
to 'int' [C:\src\reef\lang\c
> s\Org.Apache.REEF.Bridge\Org.Apache.REEF.Bridge.vcxproj]
>   InteropReturnInfo.cpp(76): warning C4302: 'type cast': truncation from 'jobject' to
'int' [C:\src\reef\lang\cs\Org.Ap
> ache.REEF.Bridge\Org.Apache.REEF.Bridge.vcxproj]
>   InteropReturnInfo.cpp(84): warning C4311: 'type cast': pointer truncation from 'jobject'
to 'int' [C:\src\reef\lang\c
> s\Org.Apache.REEF.Bridge\Org.Apache.REEF.Bridge.vcxproj]
>   InteropReturnInfo.cpp(84): warning C4302: 'type cast': truncation from 'jobject' to
'int' [C:\src\reef\lang\cs\Org.Ap
> ache.REEF.Bridge\Org.Apache.REEF.Bridge.vcxproj]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message