]> Git Repo - VerusCoin.git/commitdiff
Add strict non-void return checking
authormiketout <[email protected]>
Sun, 22 Dec 2019 09:41:40 +0000 (01:41 -0800)
committermiketout <[email protected]>
Sun, 22 Dec 2019 09:41:40 +0000 (01:41 -0800)
src/cc/CCtx.cpp
src/cc/lotto.cpp
src/cc/oracles.cpp
src/mmr.h
zcutil/build.sh

index cc51515ac0f494cd121ba3d431b864bcd5a18a0d..54db2f0c7e48ed87b0ba7fae553cfbe8e245f8ed 100644 (file)
@@ -33,7 +33,11 @@ bool SignTx(CMutableTransaction &mtx,int32_t vini,int64_t utxovalue,const CScrip
     {
         UpdateTransaction(mtx,vini,sigdata);
         return(true);
-    } else fprintf(stderr,"signing error for SignTx vini.%d %.8f\n",vini,(double)utxovalue/COIN);
+    } else 
+    {
+        fprintf(stderr,"signing error for SignTx vini.%d %.8f\n",vini,(double)utxovalue/COIN);
+        return(false);
+    }
 #else
     return(false);
 #endif
index 7403216aff9dfa8c5181a0a72f0b74547faa780f..2851ddea78aed4ebd56f01e317300d19b4803340 100644 (file)
@@ -295,6 +295,7 @@ std::string LottoCreate(uint64_t txfee,char *planstr,int64_t funding,int32_t tic
         mtx.vout.push_back(MakeCC1vout(EVAL_LOTTO,funding,lottopk));
         return(FinalizeCCTx(0,cp,mtx,mypk,txfee,CScript() << OP_RETURN << E_MARSHAL(ss << (uint8_t)EVAL_LOTTO << (uint8_t)'F' << sbits << ticketsize << odds << firstheight << period << hentropy)));
     }
+    return "";
 }
 
 std::string LottoTicket(uint64_t txfee,uint256 lottoid,int64_t numtickets)
index 10abfc1f235ad92405cf7d2153f832cd21b10b72..59d481e88d89f7375f5d487907f85f1ff9860ae0 100644 (file)
@@ -439,6 +439,7 @@ int64_t correlate_price(int32_t height,int64_t *prices,int32_t n)
     for (i=0; i<n; i++)
         fprintf(stderr,"%llu ",(long long)prices[i]);
     fprintf(stderr,"-> %llu ht.%d\n",(long long)price,height);
+    return (int64_t)price;
 }
 
 int64_t OracleCorrelatedPrice(int32_t height,std::vector <int64_t> origprices)
index 5fb67a3b91545bfe70b8f7f5d78c50594f929eb7..f491afef2f1d8ca863d9b358708e183df634d469 100644 (file)
--- a/src/mmr.h
+++ b/src/mmr.h
@@ -220,7 +220,11 @@ public:
         {
             return nodes[idx >> CHUNK_SHIFT][idx & chunkMask()];
         }
-        return NODE_TYPE();
+        else
+        {
+            std::__throw_length_error("CChunkedLayer [] index out of range");
+            return NODE_TYPE();
+        }
     }
 
     void push_back(NODE_TYPE node)
@@ -301,6 +305,11 @@ public:
         {
             return nodeSource->GetMMRNode(idx);
         }
+        else
+        {
+            std::__throw_length_error("COverlayNodeLayer [] index out of range");
+            return NODE_TYPE();
+        }
     }
 
     // node type must be moveable just to be passed here, but the default overlay has no control over the underlying storage
index fdc669f2c5eb7c3264422143356db53f4bcba414..9cf27a75b7a168fa154e2e488fe1693cc7a480f2 100755 (executable)
@@ -104,5 +104,5 @@ ld -v
 HOST="$HOST" BUILD="$BUILD" NO_PROTON="$PROTON_ARG" "$MAKE" "$@" -C ./depends/ V=1
 ./autogen.sh
 
-CONFIG_SITE="$PWD/depends/$HOST/share/config.site" ./configure "$HARDENING_ARG" "$LCOV_ARG" "$TEST_ARG" "$MINING_ARG" "$PROTON_ARG" $CONFIGURE_FLAGS CPPFLAGS='-g' CXXFLAGS='-g'
+CONFIG_SITE="$PWD/depends/$HOST/share/config.site" ./configure "$HARDENING_ARG" "$LCOV_ARG" "$TEST_ARG" "$MINING_ARG" "$PROTON_ARG" $CONFIGURE_FLAGS CPPFLAGS='-g -Wno-builtin-declaration-mismatch -Werror' CXXFLAGS='-g'
 "$MAKE" "$@" V=1
This page took 0.033697 seconds and 4 git commands to generate.