Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some MSVC warnings (just FYI) #501

Open
karel-m opened this issue Sep 29, 2019 · 3 comments
Open

Some MSVC warnings (just FYI) #501

karel-m opened this issue Sep 29, 2019 · 3 comments

Comments

@karel-m
Copy link
Member

karel-m commented Sep 29, 2019

Visual Studio 2008 (32bit build):

1>padding_pad.c
1>d:\git\libtomcrypt\src\misc\padding\padding_pad.c(126) : warning C4244: '=' : conversion from 'unsigned long' to 'unsigned char', possible loss of data
1>d:\git\libtomcrypt\src\misc\padding\padding_pad.c(131) : warning C4244: '=' : conversion from 'unsigned long' to 'unsigned char', possible loss of data
1>tweetnacl.c
1>d:\git\libtomcrypt\src\pk\ec25519\tweetnacl.c(96) : warning C4244: '=' : conversion from 'i64' to 'u8', possible loss of data
1>d:\git\libtomcrypt\src\pk\ec25519\tweetnacl.c(190) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data
1>d:\git\libtomcrypt\src\pk\ec25519\tweetnacl.c(191) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data
1>d:\git\libtomcrypt\src\pk\ec25519\tweetnacl.c(210) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data
1>d:\git\libtomcrypt\src\pk\ec25519\tweetnacl.c(211) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data
1>d:\git\libtomcrypt\src\pk\ec25519\tweetnacl.c(239) : warning C4244: 'function' : conversion from 'u64' to 'unsigned long', possible loss of data
1>d:\git\libtomcrypt\src\pk\ec25519\tweetnacl.c(466) : warning C4244: 'function' : conversion from 'u64' to 'size_t', possible loss of data
1>d:\git\libtomcrypt\src\pk\ec25519\tweetnacl.c(480) : warning C4244: 'function' : conversion from 'u64' to 'size_t', possible loss of data
1>d:\git\libtomcrypt\src\pk\ec25519\tweetnacl.c(485) : warning C4244: 'function' : conversion from 'u64' to 'size_t', possible loss of data
1>ed25519_sign.c
1>d:\git\libtomcrypt\src\pk\ed25519\ed25519_sign.c(48) : warning C4244: 'function' : conversion from 'unsigned __int64' to 'size_t', possible loss of data
1>ed25519_verify.c
1>d:\git\libtomcrypt\src\pk\ed25519\ed25519_verify.c(48) : warning C4244: 'function' : conversion from 'unsigned __int64' to 'size_t', possible loss of data
1>fortuna.c
1>d:\git\libtomcrypt\src\prngs\fortuna.c(240) : warning C4244: '=' : conversion from 'ulong64' to 'unsigned long', possible loss of data
1>chacha_memory.c
1>d:\git\libtomcrypt\src\stream\chacha\chacha_memory.c(37) : warning C4244: 'function' : conversion from 'ulong64' to 'ulong32', possible loss of data

Visual Studio 2008 (64bit build):

1>padding_pad.c
1>.\src\misc\padding\padding_pad.c(126) : warning C4244: '=' : conversion from 'unsigned long' to 'unsigned char', possible loss of data
1>.\src\misc\padding\padding_pad.c(131) : warning C4244: '=' : conversion from 'unsigned long' to 'unsigned char', possible loss of data
1>ssh_encode_sequence_multi.c
1>.\src\misc\ssh\ssh_encode_sequence_multi.c(63) : warning C4267: '+=' : conversion from 'size_t' to 'ulong32', possible loss of data
1>.\src\misc\ssh\ssh_encode_sequence_multi.c(121) : warning C4267: '=' : conversion from 'size_t' to 'ulong32', possible loss of data
1>pk_oid_str.c
1>.\src\pk\asn1\oid\pk_oid_str.c(24) : warning C4267: '=' : conversion from 'size_t' to 'unsigned long', possible loss of data
1>tweetnacl.c
1>.\src\pk\ec25519\tweetnacl.c(96) : warning C4244: '=' : conversion from 'i64' to 'u8', possible loss of data
1>.\src\pk\ec25519\tweetnacl.c(190) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data
1>.\src\pk\ec25519\tweetnacl.c(191) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data
1>.\src\pk\ec25519\tweetnacl.c(210) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data
1>.\src\pk\ec25519\tweetnacl.c(211) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data
1>.\src\pk\ec25519\tweetnacl.c(239) : warning C4244: 'function' : conversion from 'u64' to 'unsigned long', possible loss of data
1>fortuna.c
1>.\src\prngs\fortuna.c(240) : warning C4244: '=' : conversion from 'ulong64' to 'unsigned long', possible loss of data
1>chacha_memory.c
1>.\src\stream\chacha\chacha_memory.c(37) : warning C4244: 'function' : conversion from 'ulong64' to 'ulong32', possible loss of data

@sjaeckel feel free to pick some (or none) of them for fixing and close this issue.

@sjaeckel
Copy link
Member

sjaeckel commented Oct 2, 2019

The AppVeyor builds show them as well...

@karel-m
Copy link
Member Author

karel-m commented Oct 2, 2019

What about adding /WX (= treat all warnings as error)?

@sjaeckel
Copy link
Member

What about adding /WX (= treat all warnings as error)?

as soon as they're fixed, sure - why not!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants