msvc: make MSVC shutup on strncpy()
diff --git a/arch/XCore/XCoreInstPrinter.c b/arch/XCore/XCoreInstPrinter.c
index f1d797f..b71ae8e 100644
--- a/arch/XCore/XCoreInstPrinter.c
+++ b/arch/XCore/XCoreInstPrinter.c
@@ -46,8 +46,17 @@
 	char *p, *p2;
 	char tmp[128];
 
+// make MSVC shutup on strncpy()
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4996)
+#endif
+	strncpy(tmp, code, strlen(code)); // safe because code is way shorter than 128 bytes
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
 	// find the first space
-	strcpy(tmp, code);
 	p = strchr(tmp, ' ');
 	if (p) {
 		p++;