Commit 386d372
mingw.c: Fix complier warnings for a 64 bit msvc
Remove some complier warnings from msvc in compat/mingw.c for value
truncation from 64 bit to 32 bit integers.
Compiling compat/mingw.c under a 64 bit version of msvc produces
warnings. An "int" is 32 bit, and ssize_t or size_t should be 64 bit
long. Prepare compat/vcbuild/include/unistd.h to have a 64 bit type
_ssize_t, when _WIN64 is defined and 32 bit otherwise.
Further down in this include file, as before, ssize_t is defined as
_ssize_t, if needed.
Use size_t instead of int for all variables that hold the result of
strlen() or wcslen() (which cannot be negative).
Use ssize_t to hold the return value of read().
Signed-off-by: Sören Krecker <[email protected]>
Signed-off-by: Taylor Blau <[email protected]>1 parent 15030f9 commit 386d372
3 files changed
+21
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
785 | | - | |
| 785 | + | |
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
| |||
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
894 | | - | |
| 894 | + | |
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
| |||
1274 | 1274 | | |
1275 | 1275 | | |
1276 | 1276 | | |
1277 | | - | |
| 1277 | + | |
| 1278 | + | |
1278 | 1279 | | |
1279 | 1280 | | |
1280 | 1281 | | |
| |||
1339 | 1340 | | |
1340 | 1341 | | |
1341 | 1342 | | |
1342 | | - | |
| 1343 | + | |
1343 | 1344 | | |
1344 | 1345 | | |
1345 | 1346 | | |
| |||
1956 | 1957 | | |
1957 | 1958 | | |
1958 | 1959 | | |
1959 | | - | |
| 1960 | + | |
1960 | 1961 | | |
1961 | 1962 | | |
1962 | 1963 | | |
| |||
1968 | 1969 | | |
1969 | 1970 | | |
1970 | 1971 | | |
1971 | | - | |
| 1972 | + | |
| 1973 | + | |
1972 | 1974 | | |
1973 | 1975 | | |
1974 | 1976 | | |
| |||
1983 | 1985 | | |
1984 | 1986 | | |
1985 | 1987 | | |
1986 | | - | |
| 1988 | + | |
| 1989 | + | |
1987 | 1990 | | |
1988 | 1991 | | |
1989 | 1992 | | |
| |||
2001 | 2004 | | |
2002 | 2005 | | |
2003 | 2006 | | |
2004 | | - | |
| 2007 | + | |
2005 | 2008 | | |
2006 | 2009 | | |
2007 | 2010 | | |
| |||
2011 | 2014 | | |
2012 | 2015 | | |
2013 | 2016 | | |
2014 | | - | |
| 2017 | + | |
| 2018 | + | |
2015 | 2019 | | |
2016 | 2020 | | |
2017 | 2021 | | |
| |||
3085 | 3089 | | |
3086 | 3090 | | |
3087 | 3091 | | |
3088 | | - | |
| 3092 | + | |
| 3093 | + | |
3089 | 3094 | | |
3090 | 3095 | | |
3091 | 3096 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
0 commit comments