【cppcheck】warning: Redundant assignment of 'xxx' to itself.

はじめに C++の静的解析ツール「cppcheck」でソースコードを静的解析した場合に、以下の警告がでることがあります。 warning: Redundant assignment of 'xxx' to itself. cppcheckのバージョン v1.67 サンプルプログラム 以下のソースプログラムを解析にかけると表示されます。 #include "stdafx.h" #include <windows.h> #include <stdio.h> #</stdio.h></windows.h>…