The hosts lost two wickets cheaply after electing to bat in overcast conditions, but left-handed Warnapura (50 not out) helped his team reach 85-2 in the first innings at stumps.
Skipper Mahela Jayawardene was the other not-out batsman on 16 when play was called off due to bad light with 20 overs remaining. No play was possible before tea because of the rain.
Indian fast bowlers Ishant Sharma and Zaheer Khan shared the wickets.
Sri Lanka made a shaky start, losing Michael Vandort in the fourth over. The batsman was caught behind while chasing a Sharma delivery, with Dinesh Karthik taking a high catch to his left.
Warnapura added 50 runs for the second wicket with experienced Kumar Sangakkara before left-arm seamer Zaheer struck a vital blow in the 13th over.
Zaheer had Sangakkara (12) caught by former captain Rahul Dravid, who held a low catch at first slip.
Warnapura executed handsome shots on both sides of the wicket during his third Test half-century in five matches. He punished Sharma early in the innings, hitting three fours in an over.
India captain Anil Kumble also pressed Sourav Ganguly and off-spinner Harbhajan Singh into the attack in a bid to get one more wicket, but Warnapura and Jayawardene batted sensibly.
Harbhajan, who recently served a ban for five one-day internationals for slapping India team-mate Shanthakumaran Sreesanth during a domestic Twenty20 match in April, bowled just one over before play was called off.
Sri Lanka's latest spin sensation Ajantha Mendis made his Test debut, just a few weeks after leading his side to victory with a six-wicket haul against India in the Asia Cup final in Karachi early this month.