Doesn't the cat litter clump? I think that would limit its effectiveness long term as it became a brick. Depending on the size of your closet you should invest in one or more of these:
They work well in my experience, change color from blue to pink as they absorb moisture, and you just plug it in for a few hours to refresh it.
You should also buy, or start saving for, a safe... that will not only protect your firearms from thieves but give a dehumidifier a better chance to work in a smaller more enclosed space.