fix lots of warnings
many still unfixed
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
// algparam.cpp - written and placed in the public domain by Wei Dai
|
// algparam.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "algparam.h"
|
#include "algparam.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// asn.cpp - written and placed in the public domain by Wei Dai
|
// asn.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "asn.h"
|
#include "asn.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// basecode.cpp - written and placed in the public domain by Wei Dai
|
// basecode.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "basecode.h"
|
#include "basecode.h"
|
||||||
#include "fltrimpl.h"
|
#include "fltrimpl.h"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// channels.cpp - written and placed in the public domain by Wei Dai
|
// channels.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "channels.h"
|
#include "channels.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// cryptlib.cpp - written and placed in the public domain by Wei Dai
|
// cryptlib.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
* Phil Karn KA9Q, [email protected], August 1994.
|
* Phil Karn KA9Q, [email protected], August 1994.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "des.h"
|
#include "des.h"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// This file is mostly generated by Phil Karn's gensp.c
|
// This file is mostly generated by Phil Karn's gensp.c
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "des.h"
|
#include "des.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// files.cpp - written and placed in the public domain by Wei Dai
|
// files.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// filters.cpp - written and placed in the public domain by Wei Dai
|
// filters.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "filters.h"
|
#include "filters.h"
|
||||||
#include "mqueue.h"
|
#include "mqueue.h"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// fips140.cpp - written and placed in the public domain by Wei Dai
|
// fips140.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fips140.h"
|
#include "fips140.h"
|
||||||
#include "trdlocal.h" // needs to be included last for cygwin
|
#include "trdlocal.h" // needs to be included last for cygwin
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// hex.cpp - written and placed in the public domain by Wei Dai
|
// hex.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "hex.h"
|
#include "hex.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
// integer.cpp - written and placed in the public domain by Wei Dai
|
// integer.cpp - written and placed in the public domain by Wei Dai
|
||||||
// contains public domain code contributed by Alister Lee and Leonard Janke
|
// contains public domain code contributed by Alister Lee and Leonard Janke
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "integer.h"
|
#include "integer.h"
|
||||||
#include "modarith.h"
|
#include "modarith.h"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// iterhash.cpp - written and placed in the public domain by Wei Dai
|
// iterhash.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "iterhash.h"
|
#include "iterhash.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
// md5.cpp - modified by Wei Dai from Colin Plumb's public domain md5.c
|
// md5.cpp - modified by Wei Dai from Colin Plumb's public domain md5.c
|
||||||
// any modifications are placed in the public domain
|
// any modifications are placed in the public domain
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// misc.cpp - written and placed in the public domain by Wei Dai
|
// misc.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "words.h"
|
#include "words.h"
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ inline CipherDir GetCipherDir(const T &obj)
|
|||||||
template <class T> inline T rotlFixed(T x, unsigned int y)
|
template <class T> inline T rotlFixed(T x, unsigned int y)
|
||||||
{
|
{
|
||||||
assert(y < sizeof(T)*8);
|
assert(y < sizeof(T)*8);
|
||||||
return (x<<y) | (x>>(sizeof(T)*8-y));
|
return T((x<<y) | (x>>(sizeof(T)*8-y)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T> inline T rotrFixed(T x, unsigned int y)
|
template <class T> inline T rotrFixed(T x, unsigned int y)
|
||||||
@@ -488,20 +488,20 @@ inline T UnalignedGetWord(ByteOrder order, const byte *block, T*dummy=NULL)
|
|||||||
|
|
||||||
inline void UnalignedPutWord(ByteOrder order, byte *block, byte value, const byte *xorBlock = NULL)
|
inline void UnalignedPutWord(ByteOrder order, byte *block, byte value, const byte *xorBlock = NULL)
|
||||||
{
|
{
|
||||||
block[0] = xorBlock ? (value ^ xorBlock[0]) : value;
|
block[0] = byte(xorBlock ? (value ^ xorBlock[0]) : value);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void UnalignedPutWord(ByteOrder order, byte *block, word16 value, const byte *xorBlock = NULL)
|
inline void UnalignedPutWord(ByteOrder order, byte *block, word16 value, const byte *xorBlock = NULL)
|
||||||
{
|
{
|
||||||
if (order == BIG_ENDIAN_ORDER)
|
if (order == BIG_ENDIAN_ORDER)
|
||||||
{
|
{
|
||||||
block[0] = GETBYTE(value, 1);
|
block[0] = byte(GETBYTE(value, 1));
|
||||||
block[1] = GETBYTE(value, 0);
|
block[1] = byte(GETBYTE(value, 0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
block[0] = GETBYTE(value, 0);
|
block[0] = byte(GETBYTE(value, 0));
|
||||||
block[1] = GETBYTE(value, 1);
|
block[1] = byte(GETBYTE(value, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xorBlock)
|
if (xorBlock)
|
||||||
@@ -515,17 +515,17 @@ inline void UnalignedPutWord(ByteOrder order, byte *block, word32 value, const b
|
|||||||
{
|
{
|
||||||
if (order == BIG_ENDIAN_ORDER)
|
if (order == BIG_ENDIAN_ORDER)
|
||||||
{
|
{
|
||||||
block[0] = GETBYTE(value, 3);
|
block[0] = byte(GETBYTE(value, 3));
|
||||||
block[1] = GETBYTE(value, 2);
|
block[1] = byte(GETBYTE(value, 2));
|
||||||
block[2] = GETBYTE(value, 1);
|
block[2] = byte(GETBYTE(value, 1));
|
||||||
block[3] = GETBYTE(value, 0);
|
block[3] = byte(GETBYTE(value, 0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
block[0] = GETBYTE(value, 0);
|
block[0] = byte(GETBYTE(value, 0));
|
||||||
block[1] = GETBYTE(value, 1);
|
block[1] = byte(GETBYTE(value, 1));
|
||||||
block[2] = GETBYTE(value, 2);
|
block[2] = byte(GETBYTE(value, 2));
|
||||||
block[3] = GETBYTE(value, 3);
|
block[3] = byte(GETBYTE(value, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xorBlock)
|
if (xorBlock)
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// modes.cpp - written and placed in the public domain by Wei Dai
|
// modes.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "modes.h"
|
#include "modes.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// mqueue.cpp - written and placed in the public domain by Wei Dai
|
// mqueue.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "mqueue.h"
|
#include "mqueue.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// nbtheory.cpp - written and placed in the public domain by Wei Dai
|
// nbtheory.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "nbtheory.h"
|
#include "nbtheory.h"
|
||||||
#include "modarith.h"
|
#include "modarith.h"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// pkcspad.cpp - written and placed in the public domain by Wei Dai
|
// pkcspad.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "pkcspad.h"
|
#include "pkcspad.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// pssr.cpp - written and placed in the public domain by Wei Dai
|
// pssr.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "pssr.h"
|
#include "pssr.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// pubkey.cpp - written and placed in the public domain by Wei Dai
|
// pubkey.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "pubkey.h"
|
#include "pubkey.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// queue.cpp - written and placed in the public domain by Wei Dai
|
// queue.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "filters.h"
|
#include "filters.h"
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
// randpool.cpp - written and placed in the public domain by Wei Dai
|
// randpool.cpp - written and placed in the public domain by Wei Dai
|
||||||
// The algorithm in this module comes from PGP's randpool.c
|
// The algorithm in this module comes from PGP's randpool.c
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "randpool.h"
|
#include "randpool.h"
|
||||||
#include "mdc.h"
|
#include "mdc.h"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// rsa.cpp - written and placed in the public domain by Wei Dai
|
// rsa.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "rsa.h"
|
#include "rsa.h"
|
||||||
#include "asn.h"
|
#include "asn.h"
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
// Steve Reid implemented SHA-1. Wei Dai implemented SHA-2.
|
// Steve Reid implemented SHA-1. Wei Dai implemented SHA-2.
|
||||||
// Both are in the public domain.
|
// Both are in the public domain.
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "sha.h"
|
#include "sha.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|||||||
@@ -201,15 +201,15 @@ class Sink : public BufferedTransformation
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
// make these functions protected to help prevent unintentional calls to them
|
// make these functions protected to help prevent unintentional calls to them
|
||||||
BufferedTransformation::Get;
|
using BufferedTransformation::Get;
|
||||||
BufferedTransformation::Peek;
|
using BufferedTransformation::Peek;
|
||||||
BufferedTransformation::TransferTo;
|
using BufferedTransformation::TransferTo;
|
||||||
BufferedTransformation::CopyTo;
|
using BufferedTransformation::CopyTo;
|
||||||
BufferedTransformation::CopyRangeTo;
|
using BufferedTransformation::CopyRangeTo;
|
||||||
BufferedTransformation::TransferMessagesTo;
|
using BufferedTransformation::TransferMessagesTo;
|
||||||
BufferedTransformation::CopyMessagesTo;
|
using BufferedTransformation::CopyMessagesTo;
|
||||||
BufferedTransformation::TransferAllTo;
|
using BufferedTransformation::TransferAllTo;
|
||||||
BufferedTransformation::CopyAllTo;
|
using BufferedTransformation::CopyAllTo;
|
||||||
unsigned int TransferTo2(BufferedTransformation &target, unsigned long &transferBytes, const std::string &channel=NULL_CHANNEL, bool blocking=true)
|
unsigned int TransferTo2(BufferedTransformation &target, unsigned long &transferBytes, const std::string &channel=NULL_CHANNEL, bool blocking=true)
|
||||||
{transferBytes = 0; return 0;}
|
{transferBytes = 0; return 0;}
|
||||||
unsigned int CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end=ULONG_MAX, const std::string &channel=NULL_CHANNEL, bool blocking=true) const
|
unsigned int CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end=ULONG_MAX, const std::string &channel=NULL_CHANNEL, bool blocking=true) const
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// strciphr.cpp - written and placed in the public domain by Wei Dai
|
// strciphr.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "strciphr.h"
|
#include "strciphr.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user