The question is really multifaceted so I add another answer. Sergei Akbarov explained in a comment:
Actually, I was asking about any war, not necessarily WWII.
WWI was really devastating, especially for French mathematicians. A good reference is the book of Michele Audin "Fatou, Julia, Montel", mentioned in Victor's answer. The reason was apparently that the French drafted most of their young mathematicians to the army, unlike the Germans and the British. A whole generation of young mathematicians was lost. She also discusses the consequences of this for the French mathematics. (Not all consequences were negative for mathematics itself: for example the raiserise of Bourbaki can be traced to this).)
In WWII relatively few known Western European mathematicians were killed in action, but many died in the Holocaust which was certainly related to the war. There is a very good but little known source:
Adolf Goodman, Univalent Functions, vol. II. The last chapter (Ch. 18) of this book contains a large list, with short biographies of mathematicians who died in the Holocaust.