Cat food contains taurine which is necessary for felines, so if a cat eats nothing but dog food then you will run into some problems.

I suggest putting your cat's food out of the dog's reach, and don't leave food out for your pets to eat whenever they feel like it. My dogs are fed twice a day, and they have their bowl empty in about two minutes after I give them the OK to eat. The dog kibble is also probably too large to be appetizing for our cat, but on rare occasions he has eaten some.

Our cat is a free-feeder now but we have his food up and out of the dog's reach so they can't get into it. Problem solved