Here's how I answered that question for myself.
Beretta= Three year max factory warranty. (Fill out that warranty card or it is one year.) Doesn't pay for shipping both ways. Spotty customer service.
Bottom line. Seven Beretta handguns, not one has ever had an issue. If a company can sell me that many handguns without one bobble, they can have sucktastic factory support because I won't need it.
S&W=Lifetime warranty. Pays round trip for actual factory service issues. Excellent customer service.
Bottom line. Of two S&W autos purchased new in this household one M&P9c had no issues. My wife's M&P9FS was one of those in the "rust batch" where the Melonite subcontractor had screwed the pooch back in '07. Gun was gone on a return authorization and turned around inside of ten days with a new slide, barrel, and recoil spring assembly at no charge. Threw in a free magazine too. That said, I'd have much preferred they take a page from Beretta and had that pistol done right the first time, before it shipped. A company had best have excellent customer service if it is going to release mistakes out into the wild.