]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0530: xxd: MSVC warning about non-ASCII character v9.1.0530
authorKen Takata <kentkt@csc.jp>
Thu, 4 Jul 2024 17:35:48 +0000 (19:35 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 4 Jul 2024 17:35:48 +0000 (19:35 +0200)
Problem:  xxd: MSVC warning about non-ASCII character
Solution: Specify source-charset:utf-8 in Makefile (Ken Takata)

xxd.c has non-ASCII-character comments. This causes the following
warning on MSVC:
```
warning C4819: The file contains a character that cannot be represented
in the current code page (932). Save the file in Unicode format to
prevent data loss.
```

Add the `/source-charset:utf-8` option to avoid this.

closes: #15119

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/version.c
src/xxd/Make_mvc.mak

index b7812fa0090443e34488ff36e5b208d13d7f8589..159fe3b8140353933ea12ebacb00226063b9f05a 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    530,
 /**/
     529,
 /**/
index 0133d731153c452d1a3149780c2d72a5f791b754..2361ab3d5472abb843a82ce780b0155891729424 100644 (file)
@@ -9,7 +9,7 @@ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
 xxd: xxd.exe
 
 xxd.exe: xxd.c
-       cl /nologo -DWIN32 xxd.c -link -subsystem:$(SUBSYSTEM)
+       cl /nologo /source-charset:utf-8 -DWIN32 xxd.c -link -subsystem:$(SUBSYSTEM)
 
 # This was for an older compiler
 #    cl /nologo -DWIN32 xxd.c /link setargv.obj