mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-12 20:24:47 +00:00
Fixed: Warnings with GCC
This commit is contained in:
parent
3f9471aee8
commit
c006d895c7
4 changed files with 27 additions and 19 deletions
|
@ -920,6 +920,14 @@ int main(int nNbArg, char **ppArgs)
|
||||||
const CMeshGeom *pMG = dynamic_cast<const CMeshGeom*>(&pMeshML->getMeshGeom(m));
|
const CMeshGeom *pMG = dynamic_cast<const CMeshGeom*>(&pMeshML->getMeshGeom(m));
|
||||||
pVB = const_cast<CVertexBuffer*>(&pMG->getVertexBuffer());
|
pVB = const_cast<CVertexBuffer*>(&pMG->getVertexBuffer());
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pVB = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// to avoid a possible crash
|
||||||
|
if (!pVB) continue;
|
||||||
|
|
||||||
CVertexBufferReadWrite vba;
|
CVertexBufferReadWrite vba;
|
||||||
pVB->lock (vba);
|
pVB->lock (vba);
|
||||||
|
|
||||||
|
|
|
@ -360,24 +360,24 @@ void dividSize (CBitmap &bitmap)
|
||||||
}
|
}
|
||||||
|
|
||||||
const int bayerDiv8R[4][4] = {
|
const int bayerDiv8R[4][4] = {
|
||||||
7, 3, 6, 2,
|
{ 7, 3, 6, 2 },
|
||||||
1, 5, 0, 4,
|
{ 1, 5, 0, 4 },
|
||||||
6, 2, 7, 3,
|
{ 6, 2, 7, 3 },
|
||||||
0, 4, 1, 5,
|
{ 0, 4, 1, 5 }
|
||||||
};
|
};
|
||||||
|
|
||||||
const int bayerDiv8G[4][4] = {
|
const int bayerDiv8G[4][4] = {
|
||||||
0, 4, 1, 5,
|
{ 0, 4, 1, 5 },
|
||||||
6, 2, 7, 3,
|
{ 6, 2, 7, 3 },
|
||||||
1, 5, 0, 4,
|
{ 1, 5, 0, 4 },
|
||||||
7, 3, 6, 2,
|
{ 7, 3, 6, 2 }
|
||||||
};
|
};
|
||||||
|
|
||||||
const int bayerDiv8B[4][4] = {
|
const int bayerDiv8B[4][4] = {
|
||||||
5, 1, 4, 0,
|
{ 5, 1, 4, 0 },
|
||||||
3, 7, 2, 6,
|
{ 3, 7, 2, 6 },
|
||||||
4, 0, 5, 1,
|
{ 4, 0, 5, 1 },
|
||||||
2, 6, 3, 7,
|
{ 2, 6, 3, 7 }
|
||||||
};
|
};
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
#include "crypt.h"
|
#include "crypt.h"
|
||||||
|
|
||||||
char * rz_crypt(register const char *key, register const char *setting, char *buf);
|
std::string rz_crypt(register const char *key, register const char *setting, char *buf);
|
||||||
char *__crypt_sha512(const char *key, const char *setting, char *output);
|
std::string __crypt_sha512(const char *key, const char *setting, char *output);
|
||||||
|
|
||||||
|
|
||||||
// Crypts password using salt
|
// Crypts password using salt
|
||||||
|
@ -505,7 +505,7 @@ static char cryptresult[1+4+4+11+1]; /* encrypted result */
|
||||||
* Return a pointer to static data consisting of the "setting"
|
* Return a pointer to static data consisting of the "setting"
|
||||||
* followed by an encryption produced by the "key" and "setting".
|
* followed by an encryption produced by the "key" and "setting".
|
||||||
*/
|
*/
|
||||||
char * rz_crypt(register const char *key, register const char *setting, char *buf) {
|
std::string rz_crypt(register const char *key, register const char *setting, char *buf) {
|
||||||
register char *encp;
|
register char *encp;
|
||||||
register long i;
|
register long i;
|
||||||
register int t;
|
register int t;
|
||||||
|
@ -580,7 +580,7 @@ char * rz_crypt(register const char *key, register const char *setting, char *bu
|
||||||
encp += salt_size;
|
encp += salt_size;
|
||||||
if (rz_des_cipher((char *)&constdatablock, (char *)&rsltblock,
|
if (rz_des_cipher((char *)&constdatablock, (char *)&rsltblock,
|
||||||
salt, num_iter))
|
salt, num_iter))
|
||||||
return (NULL);
|
return "";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Encode the 64 cipher bits as 11 ascii characters.
|
* Encode the 64 cipher bits as 11 ascii characters.
|
||||||
|
@ -602,7 +602,7 @@ char * rz_crypt(register const char *key, register const char *setting, char *bu
|
||||||
|
|
||||||
encp[3] = 0;
|
encp[3] = 0;
|
||||||
|
|
||||||
return (cryptresult);
|
return cryptresult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -294,7 +294,7 @@ static char *sha512crypt(const char *key, const char *setting, char *output)
|
||||||
|
|
||||||
/* DS = sha(repeat-salt) */
|
/* DS = sha(repeat-salt) */
|
||||||
sha512_init(&ctx);
|
sha512_init(&ctx);
|
||||||
for (i = 0; i < 16 + md[0]; i++)
|
for (i = 0; i < 16u + md[0]; i++)
|
||||||
sha512_update(&ctx, salt, slen);
|
sha512_update(&ctx, salt, slen);
|
||||||
sha512_sum(&ctx, smd);
|
sha512_sum(&ctx, smd);
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ static char *sha512crypt(const char *key, const char *setting, char *output)
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *__crypt_sha512(const char *key, const char *setting, char *output)
|
std::string __crypt_sha512(const char *key, const char *setting, char *output)
|
||||||
{
|
{
|
||||||
static const char testkey[] = "Xy01@#\x01\x02\x80\x7f\xff\r\n\x81\t !";
|
static const char testkey[] = "Xy01@#\x01\x02\x80\x7f\xff\r\n\x81\t !";
|
||||||
static const char testsetting[] = "$6$rounds=1234$abc0123456789$";
|
static const char testsetting[] = "$6$rounds=1234$abc0123456789$";
|
||||||
|
|
Loading…
Reference in a new issue