Justice Charles Solomon set April 20 as the hip-hopper's trial date.
Lil Wayne, 26, was arrested in July 2007 in Manhattan after a concert at the Beacon Theatre. A police officer said she boarded his tour bus because she smelled marijuana, and then saw him try to hide the gun.
Defense lawyer Stacey Richman argued in court that the officer falsely claimed she smelled marijuana so she could illegally board the bus.
The rapper, whose real name is Dwayne Carter, has pleaded not guilty to gun possession and is free on $70,000 bail.
Lil Wayne's albums include "Tha Block Is Hot," "Lights Out" and "Tha Carter III."