This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 4c27828  Avoid a GCC warning after recent compiler changes: 'WARNING - 
Suspicious code. The result of the ‘rsh’ operator is not being used.  v < 0 && 
(v = (-(v ^ org.apache.royale.net.remoting.amf.AMFBinaryData.UINT_MAX_VALUE) - 
1)) >> 0;'
     new 2f19a69  Merge branch 'develop' of 
https://github.com/apache/royale-asjs into develop
4c27828 is described below

commit 4c27828483a6c6e9a712caa65b55e14fa944a794
Author: greg-dove <[email protected]>
AuthorDate: Mon Feb 4 20:18:53 2019 +1300

    Avoid a GCC warning after recent compiler changes:
    'WARNING - Suspicious code. The result of the ‘rsh’ operator is not being 
used.
     v < 0 && (v = (-(v ^ 
org.apache.royale.net.remoting.amf.AMFBinaryData.UINT_MAX_VALUE) - 1)) >> 0;'
---
 .../main/royale/org/apache/royale/net/remoting/amf/AMFBinaryData.as | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/amf/AMFBinaryData.as
 
b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/amf/AMFBinaryData.as
index d1076da..db1a4e9 100644
--- 
a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/amf/AMFBinaryData.as
+++ 
b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/amf/AMFBinaryData.as
@@ -271,7 +271,11 @@ package org.apache.royale.net.remoting.amf {
                }
                
                public function writeUInt32(v:int):void {
-                       v < 0 && (v = -(v ^ UINT_MAX_VALUE) - 1);
+               //      v < 0 && (v = -(v ^ UINT_MAX_VALUE) - 1);
+                       //avoid compiler warning after numeric coercion changes:
+                       if (v <0) {
+                               v = -(v ^ UINT_MAX_VALUE) - 1;
+                       }
                        v &= UINT_MAX_VALUE;
                        this.write((v >>> 24) & 255);
                        this.write((v >>> 16) & 255);

Reply via email to