int scanhash_cryptonight(int thr_id, uint32_t *pdata, const uint32_t *ptarget,
size_t data_len, uint32_t max_nonce, unsigned long *hashes_done) {
- uint32_t *nonceptr = ((char*)pdata) + 39;
+ uint32_t *nonceptr = (uint32_t*) (((char*)pdata) + 39);
const uint32_t first_nonce = *nonceptr;
const uint32_t Htarg = ptarget[7];
uint32_t hash[HASH_SIZE / 4] __attribute__((aligned(32)));
do {
pdata[19] = ++n;
be32enc(&endiandata[19], n);
- x11_hash(hash64, &endiandata);
+ x11_hash((char*) hash64, (const char*) endiandata);
if (((hash64[7]&0xFFFFFFFF)==0) &&
fulltest(hash64, ptarget)) {
*hashes_done = n - first_nonce + 1;
do {
pdata[19] = ++n;
be32enc(&endiandata[19], n);
- x11_hash(hash64, &endiandata);
+ x11_hash((char*) hash64, (const char*) endiandata);
if (((hash64[7]&0xFFFFFFF0)==0) &&
fulltest(hash64, ptarget)) {
*hashes_done = n - first_nonce + 1;
do {
pdata[19] = ++n;
be32enc(&endiandata[19], n);
- x11_hash(hash64, &endiandata);
+ x11_hash((char*) hash64, (const char*) endiandata);
if (((hash64[7]&0xFFFFFF00)==0) &&
fulltest(hash64, ptarget)) {
*hashes_done = n - first_nonce + 1;
do {
pdata[19] = ++n;
be32enc(&endiandata[19], n);
- x11_hash(hash64, &endiandata);
+ x11_hash((char*) hash64, (const char*) endiandata);
if (((hash64[7]&0xFFFFF000)==0) &&
fulltest(hash64, ptarget)) {
*hashes_done = n - first_nonce + 1;
do {
pdata[19] = ++n;
be32enc(&endiandata[19], n);
- x11_hash(hash64, &endiandata);
+ x11_hash((char*) hash64, (const char*) endiandata);
if (((hash64[7]&0xFFFF0000)==0) &&
fulltest(hash64, ptarget)) {
*hashes_done = n - first_nonce + 1;
do {
pdata[19] = ++n;
be32enc(&endiandata[19], n);
- x11_hash(hash64, &endiandata);
+ x11_hash((char*) hash64, (const char*) endiandata);
if (fulltest(hash64, ptarget)) {
*hashes_done = n - first_nonce + 1;
return true;
*hashes_done = n - first_nonce + 1;
pdata[19] = n;
return 0;
-}
\ No newline at end of file
+}