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

Compiler conversion warnings #340

Closed
noloader opened this issue Dec 2, 2016 · 1 comment
Closed

Compiler conversion warnings #340

noloader opened this issue Dec 2, 2016 · 1 comment

Comments

@noloader
Copy link
Collaborator

noloader commented Dec 2, 2016

Do you think we can take care of these warning?

=20

In file included from /opt/local/include/cryptopp/simple.h:17:

/opt/local/include/cryptopp/misc.h:1953:14: warning: implicit conversion lo=
ses integer precision: 'int' to 'word16' (aka 'unsigned short') [-Wconversi=
on]

                ? block[1] | (block[0] << 8)

                  ~~~~~~~~~^~~~~~~~~~~~~~~~~

/opt/local/include/cryptopp/misc.h:1954:14: warning: implicit conversion lo=
ses integer precision: 'int' to 'word16' (aka 'unsigned short') [-Wconversi=
on]

                : block[0] | (block[1] << 8);

                  ~~~~~~~~~^~~~~~~~~~~~~~~~~

In file included from ../src/timing.cpp:19:

In file included from /opt/local/include/cryptopp/oids.h:9:

/opt/local/include/cryptopp/asn.h:344:71: warning: implicit conversion chan=
ges signedness: 'int' to 'byte' (aka 'unsigned char') [-Wsign-conversion]

        void BERDecode(BERSequenceDecoder &seqDecoder, byte tag, byte mask =
=3D ~CONSTRUCTED)

                                                                           =
~ ^~~~~~~~~~~~

/opt/local/include/cryptopp/asn.h:541:32: warning: implicit conversion lose=
s integer precision: 'unsigned long' to 'word32' (aka 'unsigned int') [-Wsh=
orten-64-to-32]

        {return ::CryptoPP::OID(lhs)+=3Drhs;}

                                    ~~^~~

In file included from ../src/timing.cpp:20:

In file included from /opt/local/include/cryptopp/osrng.h:14:

In file included from /opt/local/include/cryptopp/randpool.h:35:

In file included from /opt/local/include/cryptopp/aes.h:9:

In file included from /opt/local/include/cryptopp/rijndael.h:11:

/opt/local/include/cryptopp/seckey.h:89:85: warning: implicit conversion ch=
anges signedness: 'int' to 'unsigned int' [-Wsign-conversion]

                                throw InvalidRounds(alg ? alg->AlgorithmNam=
e() : std::string("VariableRounds"), rounds);

                                      ~~~~~~~~~~~~~                        =
                                     ^~~~~~

/opt/local/include/cryptopp/seckey.h:94:85: warning: implicit conversion ch=
anges signedness: 'int' to 'unsigned int' [-Wsign-conversion]

                                throw InvalidRounds(alg ? alg->AlgorithmNam=
e() : std::string("VariableRounds"), rounds);

                                      ~~~~~~~~~~~~~                        =
                                     ^~~~~~

In file included from ../src/timing.cpp:18:

In file included from /opt/local/include/cryptopp/hex.h:10:

In file included from /opt/local/include/cryptopp/basecode.h:10:

In file included from /opt/local/include/cryptopp/filters.h:17:

In file included from /opt/local/include/cryptopp/simple.h:17:

/opt/local/include/cryptopp/misc.h:554:41: warning: operand of ? changes si=
gnedness: 'int' to 'unsigned int' [-Wsign-conversion]

                result =3D char((digit < 10 ? '0' : (CH - 10)) + digit) + r=
esult;

                                                   ~~~^~~~   ~

/opt/local/include/cryptopp/simple.h:58:113: note: in instantiation of func=
tion template specialization 'CryptoPP::IntToString<unsigned int>' requeste=
d here

        explicit InvalidRounds(const std::string &algorithm, unsigned int r=
ounds) : InvalidArgument(algorithm + ": " + IntToString(rounds) + " is not =
a valid number of rounds") {}

                                                                           =
                                            ^

7 warnings generated.
@noloader
Copy link
Collaborator Author

noloader commented Dec 2, 2016

Cleared at Commit 6eb2792bc26aeb.

@noloader noloader closed this as completed Dec 2, 2016
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

1 participant