boolean doorSwitch;
void setup() {
pinMode(doorSwitch, INPUT);
}
I wouldn't recommend sending an uninitialized variable to a function that does something based on it's value.
I also would say it's better to avoid mixing the usage of variables for readings/states with pins:
const int myInputPin = 4;
int myInputState;
void setup()
{
pinMode(myInputPin, INPUT);
}
void loop()
{
myInputState = digitalRead(myInputPin);
// Do something with my input
}