Skip to content

Commit

Permalink
Add type casts to ckalloc and ckfree in evaluator
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesetc committed Sep 25, 2023
1 parent 7bec645 commit aa0a0cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/evaluator.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ namespace eval Evaluator {

queue_entry_t* entryPtr;
while ((entryPtr = pqueue_pop(queue)) != NULL) {
queue_entry_t entry = *entryPtr; ckfree(entryPtr);
queue_entry_t entry = *entryPtr; ckfree((char*) entryPtr);
if (entry.op == ASSERT) {
op("Assert (%s)", Tcl_GetString(entry.assert.clause));
statement_handle_t id; bool isNewStatement;
Expand Down Expand Up @@ -1287,7 +1287,7 @@ namespace eval Evaluator {
}
$cc code {
void queueInsert(queue_entry_t entry) {
queue_entry_t* ptr = ckalloc(sizeof(entry));
queue_entry_t* ptr = (queue_entry_t*)ckalloc(sizeof(entry));
*ptr = entry;
ptr->seq = seq++;
pqueue_insert(queue, ptr);
Expand Down

0 comments on commit aa0a0cc

Please sign in to comment.