]> Git Repo - cpuminer-multi.git/commitdiff
Fix compiler warnings
authorlucas <[email protected]>
Tue, 13 May 2014 14:26:47 +0000 (15:26 +0100)
committerlucas <[email protected]>
Tue, 13 May 2014 14:28:04 +0000 (15:28 +0100)
cryptonight.c
x11.c

index 4e1301ca0cb5bf6ab527ffdd0c1e3ec0ff86b3e7..4a7f91a22ed73bbd02717b5237c0e045105178c6 100644 (file)
@@ -175,7 +175,7 @@ void cryptonight_hash(void* output, const void* input, size_t input_len) {
 
 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)));
diff --git a/x11.c b/x11.c
index b2ebcdee180835bf247a734b1d9085f26dfc8983..ca9bcab0f40f1e7fab7a8cac8b7acd075e6235cc 100644 (file)
--- a/x11.c
+++ b/x11.c
@@ -114,7 +114,7 @@ int scanhash_x11(int thr_id, uint32_t *pdata, const uint32_t *ptarget,
                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;
@@ -127,7 +127,7 @@ int scanhash_x11(int thr_id, uint32_t *pdata, const uint32_t *ptarget,
                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;
@@ -140,7 +140,7 @@ int scanhash_x11(int thr_id, uint32_t *pdata, const uint32_t *ptarget,
                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;
@@ -153,7 +153,7 @@ int scanhash_x11(int thr_id, uint32_t *pdata, const uint32_t *ptarget,
                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;
@@ -167,7 +167,7 @@ int scanhash_x11(int thr_id, uint32_t *pdata, const uint32_t *ptarget,
                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;
@@ -181,7 +181,7 @@ int scanhash_x11(int thr_id, uint32_t *pdata, const uint32_t *ptarget,
                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;
@@ -193,4 +193,4 @@ int scanhash_x11(int thr_id, uint32_t *pdata, const uint32_t *ptarget,
        *hashes_done = n - first_nonce + 1;
        pdata[19] = n;
        return 0;
-}
\ No newline at end of file
+}
This page took 0.032621 seconds and 4 git commands to generate.