From 0a3c217925279b662870681f364f98584dd708c5 Mon Sep 17 00:00:00 2001
From: Christopher Ferris <chrisfer@us.ibm.com>
Date: Sat, 15 Apr 2017 20:54:59 -0400
Subject: [PATCH] FAB-3180 fix staticcheck errors in peer

peer/chaincode/install.go:46:26: printf-style function with
 dynamic first argument and no further arguments should use
 print-style function instead (SA1006)
peer/chaincode/install.go:47:26: printf-style function with
 dynamic first argument and no further arguments should use
 print-style function instead (SA1006)
peer/chaincode/instantiate.go:39:26: printf-style function with
 dynamic first argument and no further arguments should use
 print-style function instead (SA1006)
peer/chaincode/instantiate.go:40:26: printf-style function with
 dynamic first argument and no further arguments should use
print-style function instead (SA1006)
peer/channel/join.go:71:2: this value of spec is never used (SA4006)

Change-Id: I98d1871a554061c4ee4f72609bf5869ab6227d51
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
---
 peer/chaincode/install.go     | 4 ++--
 peer/chaincode/instantiate.go | 4 ++--
 peer/channel/join.go          | 4 +---
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/peer/chaincode/install.go b/peer/chaincode/install.go
index 3719b74f908..b2a0a283f8c 100644
--- a/peer/chaincode/install.go
+++ b/peer/chaincode/install.go
@@ -43,8 +43,8 @@ const install_desc = "Package the specified chaincode into a deployment spec and
 func installCmd(cf *ChaincodeCmdFactory) *cobra.Command {
 	chaincodeInstallCmd = &cobra.Command{
 		Use:       "install",
-		Short:     fmt.Sprintf(install_desc),
-		Long:      fmt.Sprintf(install_desc),
+		Short:     fmt.Sprint(install_desc),
+		Long:      fmt.Sprint(install_desc),
 		ValidArgs: []string{"1"},
 		RunE: func(cmd *cobra.Command, args []string) error {
 			var ccpackfile string
diff --git a/peer/chaincode/instantiate.go b/peer/chaincode/instantiate.go
index d7704441c55..3f8a57b2df0 100644
--- a/peer/chaincode/instantiate.go
+++ b/peer/chaincode/instantiate.go
@@ -36,8 +36,8 @@ const instantiate_desc = "Deploy the specified chaincode to the network."
 func instantiateCmd(cf *ChaincodeCmdFactory) *cobra.Command {
 	chaincodeInstantiateCmd = &cobra.Command{
 		Use:       instantiate_cmdname,
-		Short:     fmt.Sprintf(instantiate_desc),
-		Long:      fmt.Sprintf(instantiate_desc),
+		Short:     fmt.Sprint(instantiate_desc),
+		Long:      fmt.Sprint(instantiate_desc),
 		ValidArgs: []string{"1"},
 		RunE: func(cmd *cobra.Command, args []string) error {
 			return chaincodeDeploy(cmd, args, cf)
diff --git a/peer/channel/join.go b/peer/channel/join.go
index 846f105b8bc..8caa6c51c46 100644
--- a/peer/channel/join.go
+++ b/peer/channel/join.go
@@ -68,12 +68,10 @@ func getJoinCCSpec() (*pb.ChaincodeSpec, error) {
 		return nil, GBFileNotFoundErr(err.Error())
 	}
 
-	spec := &pb.ChaincodeSpec{}
-
 	// Build the spec
 	input := &pb.ChaincodeInput{Args: [][]byte{[]byte(cscc.JoinChain), gb}}
 
-	spec = &pb.ChaincodeSpec{
+	spec := &pb.ChaincodeSpec{
 		Type:        pb.ChaincodeSpec_Type(pb.ChaincodeSpec_Type_value["GOLANG"]),
 		ChaincodeId: &pb.ChaincodeID{Name: "cscc"},
 		Input:       input,