He didn't write any books or literary works. The name you may be thinking of is another famous author, E.F. Benson (Edward Frederic Benson), who wrote a well-known novel titled "The Luck of the Vails" which featured a character named "Warren Hastings." This character is loosely based on the real historical figure.