From d8f5e647c92b73835665c555d06c8814c7d0dbb5 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 30 May 2019 23:50:53 +0200 Subject: NXwindow.c: fix compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NXwindow.c:265:27: warning: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-overflow=] sprintf(artsd_port,"%d", nPort); ^~ NXwindow.c:265:26: note: directive argument in the range [-2147476648, 2147483647] sprintf(artsd_port,"%d", nPort); ^~~~ NXwindow.c:265:7: note: ‘sprintf’ output between 2 and 12 bytes into a destination of size 10 sprintf(artsd_port,"%d", nPort); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 2fe37f79c..0851daf97 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -296,7 +296,7 @@ InitRootWindow(WindowPtr pWin) #ifdef NXAGENT_ARTSD { char artsd_port[10]; - int nPort; + short int nPort; extern void nxagentPropagateArtsdProperties(ScreenPtr pScreen, char *port); nPort = atoi(display) + 7000; sprintf(artsd_port,"%d", nPort); -- cgit v1.2.3