From cb7462653011fce57766053ae9e8a2076db10bfd Mon Sep 17 00:00:00 2001 From: Brian Hinz Date: Sun, 9 Oct 2011 17:58:48 +0000 Subject: [PATCH] Fix more unused local variables and static (class) variables and methods being used in instance warnings git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4718 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- java/com/tigervnc/rfb/CConnection.java | 2 +- java/com/tigervnc/rfb/CSecurityTLS.java | 7 +++---- java/com/tigervnc/rfb/CSecurityVeNCrypt.java | 2 +- java/com/tigervnc/rfb/TightDecoder.java | 1 - java/com/tigervnc/vncviewer/CConn.java | 6 +++--- java/com/tigervnc/vncviewer/ServerDialog.java | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/java/com/tigervnc/rfb/CConnection.java b/java/com/tigervnc/rfb/CConnection.java index 15e19896..8a477654 100644 --- a/java/com/tigervnc/rfb/CConnection.java +++ b/java/com/tigervnc/rfb/CConnection.java @@ -102,7 +102,7 @@ abstract public class CConnection extends CMsgHandler { int secType = Security.secTypeInvalid; List secTypes = new ArrayList(); - secTypes = security.GetEnabledSecTypes(); + secTypes = Security.GetEnabledSecTypes(); //for (Iterator i = secTypes.iterator(); i.hasNext(); ) // vlog.info(((Integer)i.next()).toString()); diff --git a/java/com/tigervnc/rfb/CSecurityTLS.java b/java/com/tigervnc/rfb/CSecurityTLS.java index c26a1986..2b8bf355 100644 --- a/java/com/tigervnc/rfb/CSecurityTLS.java +++ b/java/com/tigervnc/rfb/CSecurityTLS.java @@ -56,9 +56,9 @@ public class CSecurityTLS extends CSecurity { } sslfactory = ctx.getSocketFactory(); try { - ssl = (SSLSocket)sslfactory.createSocket(cc.sock, - cc.sock.getInetAddress().getHostName(), - cc.sock.getPort(), true); + ssl = (SSLSocket)sslfactory.createSocket(CConnection.sock, + CConnection.sock.getInetAddress().getHostName(), + CConnection.sock.getPort(), true); } catch (java.io.IOException e) { throw new Exception(e.toString()); } @@ -242,7 +242,6 @@ public class CSecurityTLS extends CSecurity { private SSLSession session; private String cafile, crlfile; private InStream is; - private OutStream os; private SSLSocket ssl; static LogWriter vlog = new LogWriter("CSecurityTLS"); diff --git a/java/com/tigervnc/rfb/CSecurityVeNCrypt.java b/java/com/tigervnc/rfb/CSecurityVeNCrypt.java index ae758e7f..75276c77 100644 --- a/java/com/tigervnc/rfb/CSecurityVeNCrypt.java +++ b/java/com/tigervnc/rfb/CSecurityVeNCrypt.java @@ -131,7 +131,7 @@ public class CSecurityVeNCrypt extends CSecurity { Iterator j; List secTypes = new ArrayList(); - secTypes = security.GetEnabledExtSecTypes(); + secTypes = Security.GetEnabledExtSecTypes(); /* Honor server's security type order */ for (i = 0; i < nAvailableTypes; i++) { diff --git a/java/com/tigervnc/rfb/TightDecoder.java b/java/com/tigervnc/rfb/TightDecoder.java index 5cce3a93..d01a8c3c 100644 --- a/java/com/tigervnc/rfb/TightDecoder.java +++ b/java/com/tigervnc/rfb/TightDecoder.java @@ -63,7 +63,6 @@ public class TightDecoder extends Decoder { int comp_ctl = is.readU8(); - int bytesPerPixel = handler.cp.pf().bpp / 8; boolean bigEndian = handler.cp.pf().bigEndian; // Flush zlib streams if we are told by the server to do so. diff --git a/java/com/tigervnc/vncviewer/CConn.java b/java/com/tigervnc/vncviewer/CConn.java index a375438b..d504eb16 100644 --- a/java/com/tigervnc/vncviewer/CConn.java +++ b/java/com/tigervnc/vncviewer/CConn.java @@ -208,7 +208,7 @@ public class CConn extends CConnection public boolean showMsgBox(int flags, String title, String text) { - StringBuffer titleText = new StringBuffer("VNC Viewer: "+title); + //StringBuffer titleText = new StringBuffer("VNC Viewer: "+title); return true; } @@ -744,7 +744,7 @@ public class CConn extends CConnection /* Process non-VeNCrypt sectypes */ java.util.List secTypes = new ArrayList(); - secTypes = security.GetEnabledSecTypes(); + secTypes = Security.GetEnabledSecTypes(); for (Iterator i = secTypes.iterator(); i.hasNext();) { switch ((Integer)i.next()) { case Security.secTypeVeNCrypt: @@ -764,7 +764,7 @@ public class CConn extends CConnection /* Process VeNCrypt subtypes */ if (options.secVeNCrypt.isSelected()) { java.util.List secTypesExt = new ArrayList(); - secTypesExt = security.GetEnabledExtSecTypes(); + secTypesExt = Security.GetEnabledExtSecTypes(); for (Iterator iext = secTypesExt.iterator(); iext.hasNext();) { switch ((Integer)iext.next()) { case Security.secTypePlain: diff --git a/java/com/tigervnc/vncviewer/ServerDialog.java b/java/com/tigervnc/vncviewer/ServerDialog.java index 55ad0d02..f5e56141 100644 --- a/java/com/tigervnc/vncviewer/ServerDialog.java +++ b/java/com/tigervnc/vncviewer/ServerDialog.java @@ -107,7 +107,7 @@ class ServerDialog extends Dialog implements } public void itemStateChanged(ItemEvent e) { - Object s = e.getSource(); + //Object s = e.getSource(); } public void actionPerformed(ActionEvent e) { -- 2.39.5