[nfs-utils PATCH 6/7] rpcgen: rpc_hout: fix potential -Wformat-security warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



f_print()'s argument "separator" is not known because it's passed as an
argument and with -Wformat-security will cause a useless warning. Let's
ignore by adding "#pragma GCC diagnostic ignored/warning" before and
after f_print().

Signed-off-by: Giulio Benetti <giulio.benetti@xxxxxxxxxxxxxxxxxxxxxx>
---
 tools/rpcgen/rpc_hout.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/rpcgen/rpc_hout.c b/tools/rpcgen/rpc_hout.c
index ea1cb24f..999c061f 100644
--- a/tools/rpcgen/rpc_hout.c
+++ b/tools/rpcgen/rpc_hout.c
@@ -467,7 +467,9 @@ pdeclaration(char *name, declaration *dec, int tab, char *separator)
 			break;
 		}
 	}
+#pragma GCC diagnostic ignored "-Wformat-security"
 	f_print(fout, separator );
+#pragma GCC diagnostic warning "-Wformat-security"
 }
 
 static int
-- 
2.20.1




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux