mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-15 20:23: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));
|
||||
pVB = const_cast<CVertexBuffer*>(&pMG->getVertexBuffer());
|
||||
}
|
||||
else
|
||||
{
|
||||
pVB = NULL;
|
||||
}
|
||||
|
||||
// to avoid a possible crash
|
||||
if (!pVB) continue;
|
||||
|
||||
CVertexBufferReadWrite vba;
|
||||
pVB->lock (vba);
|
||||
|
||||
|
|
|
@ -360,24 +360,24 @@ void dividSize (CBitmap &bitmap)
|
|||
}
|
||||
|
||||
const int bayerDiv8R[4][4] = {
|
||||
7, 3, 6, 2,
|
||||
1, 5, 0, 4,
|
||||
6, 2, 7, 3,
|
||||
0, 4, 1, 5,
|
||||
{ 7, 3, 6, 2 },
|
||||
{ 1, 5, 0, 4 },
|
||||
{ 6, 2, 7, 3 },
|
||||
{ 0, 4, 1, 5 }
|
||||
};
|
||||
|
||||
const int bayerDiv8G[4][4] = {
|
||||
0, 4, 1, 5,
|
||||
6, 2, 7, 3,
|
||||
1, 5, 0, 4,
|
||||
7, 3, 6, 2,
|
||||
{ 0, 4, 1, 5 },
|
||||
{ 6, 2, 7, 3 },
|
||||
{ 1, 5, 0, 4 },
|
||||
{ 7, 3, 6, 2 }
|
||||
};
|
||||
|
||||
const int bayerDiv8B[4][4] = {
|
||||
5, 1, 4, 0,
|
||||
3, 7, 2, 6,
|
||||
4, 0, 5, 1,
|
||||
2, 6, 3, 7,
|
||||
{ 5, 1, 4, 0 },
|
||||
{ 3, 7, 2, 6 },
|
||||
{ 4, 0, 5, 1 },
|
||||
{ 2, 6, 3, 7 }
|
||||
};
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
#include "crypt.h"
|
||||
|
||||
char * 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 rz_crypt(register const char *key, register const char *setting, char *buf);
|
||||
std::string __crypt_sha512(const char *key, const char *setting, char *output);
|
||||
|
||||
|
||||
// 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"
|
||||
* 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 long i;
|
||||
register int t;
|
||||
|
@ -580,7 +580,7 @@ char * rz_crypt(register const char *key, register const char *setting, char *bu
|
|||
encp += salt_size;
|
||||
if (rz_des_cipher((char *)&constdatablock, (char *)&rsltblock,
|
||||
salt, num_iter))
|
||||
return (NULL);
|
||||
return "";
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
||||
return (cryptresult);
|
||||
return cryptresult;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -294,7 +294,7 @@ static char *sha512crypt(const char *key, const char *setting, char *output)
|
|||
|
||||
/* DS = sha(repeat-salt) */
|
||||
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_sum(&ctx, smd);
|
||||
|
||||
|
@ -373,7 +373,7 @@ static char *sha512crypt(const char *key, const char *setting, char *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 testsetting[] = "$6$rounds=1234$abc0123456789$";
|
||||
|
|
Loading…
Reference in a new issue