It was a joke, and companies often allow jokes or other "fair use" references to their intellectual property.
What would be the purpose of a lawsuit? What kind of outcome would they want? I'm not a lawyer but I guess they might seek financial recompense or to ban the showing of Deadpool with that reference in it.
The level of loss to Warner Bros reputation or their future earnings from their ownership of the Batman franchise seems negligible if anything at all. Indeed in a strange way getting a reference in Deadpool could be argued as a compliment. It would therefore be hard to justify any figure for financial damages.
Embarking upon a lawsuit also has negative side effects. The fanbase of the DC and Marvel film universes are often the same people so aggressively pursuing every possible legal infraction would result in significant negative publicity. It isn't going to be worth it.
This situation is significantly different to the licensing of the X-Men/Mutant characters to 21st Century Fox. This is a situation where a legal agreement has been signed by the two companies, where Marvel have agreed to not use Mutant characters in their film properties. Hence references to Magneto or Mutants is specifically barred. Using them would undermine 21st Century Fox's Intellectual Property that they paid for.