[X2Go-Commits] [nx-libs] 63/429: Channel.h: rename variable to prevent shadowing
git-admin at x2go.org
git-admin at x2go.org
Mon Oct 18 09:36:06 CEST 2021
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit 2c66355c229bd10ad9f0c34e9ea31ed50c715955
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Tue Nov 3 20:31:11 2020 +0100
Channel.h: rename variable to prevent shadowing
In file included from Proxy.h:39:0,
from ServerProxy.h:32,
from ServerProxy.cpp:36:
Channel.h: In member function 'int Channel::handleEncodeIdentity(EncodeBuffer&, ChannelCache*, MessageStore*, const unsigned char*, unsigned int, int)':
Channel.h:369:3: warning: declaration of 'bigEndian' shadows a member of 'this' [-Wshadow]
{
^
Channel.h: In member function 'int Channel::handleDecodeIdentity(DecodeBuffer&, ChannelCache*, MessageStore*, unsigned char*&, unsigned int&, int, WriteBuffer*)':
Channel.h:378:3: warning: declaration of 'bigEndian' shadows a member of 'this' [-Wshadow]
{
^
RHEL7's g++ 4.8.5 reports this while Debian's g++ 10.2.0-15 does
not. This is described in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57709 and fixed in gcc
5.0.
Rename the variables anyway to be on the safe side.
Fixes ArcticaProject/nx-libs#956
---
nxcomp/src/Channel.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/nxcomp/src/Channel.h b/nxcomp/src/Channel.h
index 7e432416a..3b37fa60d 100644
--- a/nxcomp/src/Channel.h
+++ b/nxcomp/src/Channel.h
@@ -365,18 +365,18 @@ class Channel
int handleEncodeIdentity(EncodeBuffer &encodeBuffer, ChannelCache *channelCache,
MessageStore *store, const unsigned char *buffer,
- const unsigned int size, int bigEndian)
+ const unsigned int size, int _bigEndian)
{
return (store -> encodeIdentity(encodeBuffer, buffer, size,
- bigEndian, channelCache));
+ _bigEndian, channelCache));
}
int handleDecodeIdentity(DecodeBuffer &decodeBuffer, ChannelCache *channelCache,
MessageStore *store, unsigned char *&buffer,
- unsigned int &size, int bigEndian,
+ unsigned int &size, int _bigEndian,
WriteBuffer *writeBuffer)
{
- return (store -> decodeIdentity(decodeBuffer, buffer, size, bigEndian,
+ return (store -> decodeIdentity(decodeBuffer, buffer, size, _bigEndian,
writeBuffer, channelCache));
}
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list