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
|
||||
|
||||
#include "global.h"
|
||||
#include "pch.h"
|
||||
#include "algparam.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// asn.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "asn.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// basecode.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "basecode.h"
|
||||
#include "fltrimpl.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// channels.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "channels.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// cryptlib.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "cryptlib.h"
|
||||
#include "misc.h"
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
* Phil Karn KA9Q, karn@unix.ka9q.ampr.org, August 1994.
|
||||
*/
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "misc.h"
|
||||
#include "des.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// This file is mostly generated by Phil Karn's gensp.c
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "des.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// files.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "files.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// filters.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "filters.h"
|
||||
#include "mqueue.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// fips140.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "fips140.h"
|
||||
#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
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "hex.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// integer.cpp - written and placed in the public domain by Wei Dai
|
||||
// contains public domain code contributed by Alister Lee and Leonard Janke
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "integer.h"
|
||||
#include "modarith.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// iterhash.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "iterhash.h"
|
||||
#include "misc.h"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// md5.cpp - modified by Wei Dai from Colin Plumb's public domain md5.c
|
||||
// any modifications are placed in the public domain
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "md5.h"
|
||||
#include "misc.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// misc.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "misc.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)
|
||||
{
|
||||
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)
|
||||
@@ -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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (order == BIG_ENDIAN_ORDER)
|
||||
{
|
||||
block[0] = GETBYTE(value, 1);
|
||||
block[1] = GETBYTE(value, 0);
|
||||
block[0] = byte(GETBYTE(value, 1));
|
||||
block[1] = byte(GETBYTE(value, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
block[0] = GETBYTE(value, 0);
|
||||
block[1] = GETBYTE(value, 1);
|
||||
block[0] = byte(GETBYTE(value, 0));
|
||||
block[1] = byte(GETBYTE(value, 1));
|
||||
}
|
||||
|
||||
if (xorBlock)
|
||||
@@ -515,17 +515,17 @@ inline void UnalignedPutWord(ByteOrder order, byte *block, word32 value, const b
|
||||
{
|
||||
if (order == BIG_ENDIAN_ORDER)
|
||||
{
|
||||
block[0] = GETBYTE(value, 3);
|
||||
block[1] = GETBYTE(value, 2);
|
||||
block[2] = GETBYTE(value, 1);
|
||||
block[3] = GETBYTE(value, 0);
|
||||
block[0] = byte(GETBYTE(value, 3));
|
||||
block[1] = byte(GETBYTE(value, 2));
|
||||
block[2] = byte(GETBYTE(value, 1));
|
||||
block[3] = byte(GETBYTE(value, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
block[0] = GETBYTE(value, 0);
|
||||
block[1] = GETBYTE(value, 1);
|
||||
block[2] = GETBYTE(value, 2);
|
||||
block[3] = GETBYTE(value, 3);
|
||||
block[0] = byte(GETBYTE(value, 0));
|
||||
block[1] = byte(GETBYTE(value, 1));
|
||||
block[2] = byte(GETBYTE(value, 2));
|
||||
block[3] = byte(GETBYTE(value, 3));
|
||||
}
|
||||
|
||||
if (xorBlock)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// modes.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "modes.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// mqueue.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "mqueue.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// nbtheory.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "nbtheory.h"
|
||||
#include "modarith.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// pkcspad.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "pkcspad.h"
|
||||
#include <assert.h>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// pssr.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "pssr.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// pubkey.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "pubkey.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// queue.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "queue.h"
|
||||
#include "filters.h"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// randpool.cpp - written and placed in the public domain by Wei Dai
|
||||
// The algorithm in this module comes from PGP's randpool.c
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "randpool.h"
|
||||
#include "mdc.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// rsa.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "rsa.h"
|
||||
#include "asn.h"
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Steve Reid implemented SHA-1. Wei Dai implemented SHA-2.
|
||||
// Both are in the public domain.
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "sha.h"
|
||||
#include "misc.h"
|
||||
|
||||
@@ -201,15 +201,15 @@ class Sink : public BufferedTransformation
|
||||
{
|
||||
protected:
|
||||
// make these functions protected to help prevent unintentional calls to them
|
||||
BufferedTransformation::Get;
|
||||
BufferedTransformation::Peek;
|
||||
BufferedTransformation::TransferTo;
|
||||
BufferedTransformation::CopyTo;
|
||||
BufferedTransformation::CopyRangeTo;
|
||||
BufferedTransformation::TransferMessagesTo;
|
||||
BufferedTransformation::CopyMessagesTo;
|
||||
BufferedTransformation::TransferAllTo;
|
||||
BufferedTransformation::CopyAllTo;
|
||||
using BufferedTransformation::Get;
|
||||
using BufferedTransformation::Peek;
|
||||
using BufferedTransformation::TransferTo;
|
||||
using BufferedTransformation::CopyTo;
|
||||
using BufferedTransformation::CopyRangeTo;
|
||||
using BufferedTransformation::TransferMessagesTo;
|
||||
using BufferedTransformation::CopyMessagesTo;
|
||||
using BufferedTransformation::TransferAllTo;
|
||||
using BufferedTransformation::CopyAllTo;
|
||||
unsigned int TransferTo2(BufferedTransformation &target, unsigned long &transferBytes, const std::string &channel=NULL_CHANNEL, bool blocking=true)
|
||||
{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
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// strciphr.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "pch.h"
|
||||
#include "strciphr.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user