Skip to content

Commit

Permalink
Wrong ifdef, also more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdelisle committed Nov 14, 2022
1 parent 1b1fb15 commit ee4a421
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packetcrypt-sys/packetcrypt/src/AnnMiner.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ static void populateTable(CryptoCycle_Item_t* table, Buf64_t* annHash0) {
}
}

__attribute__((unused))
static int populateTableJIT(Worker_t* w, Buf64_t* seed) {
if (Announce_createProg(w->vctx, &seed->thirtytwos[0])) {
return -1;
Expand All @@ -162,7 +163,7 @@ static int populateTableJIT(Worker_t* w, Buf64_t* seed) {

// -1 means try again
static int populateTable2(Worker_t* w, Buf64_t* seed) {
#ifdef ENABLE_JIT
#ifdef JIT_ENABLED
return populateTableJIT(w, seed);
#endif
if (Announce_createProg(w->vctx, &seed->thirtytwos[0])) {
Expand Down
8 changes: 8 additions & 0 deletions packetcrypt-sys/packetcrypt/src/JIT/NoJIT.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@

rh_jit_program_t* rh_generate_program(uint32_t* programBuffer, uint32_t programLength)
{
programBuffer = programBuffer;
programLength = programLength;
assert(0 && "JIT not enabled");
}
void rh_run(uint32_t* programBuffer, int index, void* hashIn, void* hashOut, rh_jit_program_t* program)
{
programBuffer = programBuffer;
index = index;
hashIn = hashIn;
hashOut = hashOut;
program = program;
assert(0 && "JIT not enabled");
}
void rh_free_program(rh_jit_program_t* program)
{
program = program;
assert(0 && "JIT not enabled");
}

0 comments on commit ee4a421

Please sign in to comment.