Pape Abou Cisse had a goalscoring debut for the west Africans after breaking the deadlock at the Leopold Sedar Senghor Stadium with his effort in the 17th minute.
Gueye doubled the lead a minute later with his second international goal for Senegal. After the restart, Niang capped the victory for Aliou Cisse’s men with effort in the 50th minute.
The victory moved Senegal to the summit of Group A with 7 points from three games and with a higher goal difference than Madagascar that also have the same points.
They continue their qualification series for next year’s continental showpiece against Sudan in Khartoum on Tuesday.