Lawyer Gary Withey said he warned Whyte as he claimed on Monday that Sir David Murray’s advisers had not been “open and candid”.
The accusations were heard at Whyte’s trial at the High Court in Glasgow.
The 46 year-old denies a charge of fraud and a second allegation under the Companies Act in connection with his May 2011 takeover.
Mr Withey was giving evidence for a third day.
The corporate lawyer had worked for English firm Collyer Bristow.
The 52 year-old was instructed in the takeover talks having initially met Whyte in mid-2010.
Mr Withey was quizzed about a so-called “data room” set up for any takeover.
The witness said: “I came into five A4 box files and I was told that was the data room. I was shocked.”
Whyte’s QC Donald Findlay asked Mr Withey did he think Sir David’s team were being “open and candid”.
He replied: “I knew that they were not.”
Mr Findlay referred to two “liabilities” that had been facing Rangers – the so-called Small Tax Case and the Big Tax Case.
The advocate put to him: “In the early stages you had no indications that they existed?”
Mr Withey: “That is correct.”
The witness also said: “I told Mr Whyte that he would be mad to go ahead with the transaction and he should walk away.
“There were things that we had to discover and it made it uncomfortable having to discover things rather than being told upfront.”
Asked about the discovery of the Big Tax Case, Mr Withey told the court: “I remember having a spreadsheet. I remember having two meetings with their (Murray team) QC.
“But, anything else was highly confidential.”
Whyte later went on to strike a £1 deal to acquire Sir David’s majority stake at Rangers.
Mr Findlay asked Mr Withey: “Did anyone ever bother to hand over a £1 coin even as a souvenir?”
The witness said he was not aware of that.
The trial, before Judge Lady Stacey, continues.