C/C++/Error warning: NULL used in arithmetic

 
In file included from ../SimulationBase/sim_vector.h:10:0,
                 from sim_extern.h:7,
                 from ElasticSimulator.cpp:2:
../SimulationBase/sim_util.h: In function 'const char* stristr(const char*, const char*)':
../SimulationBase/sim_util.h:101:39: warning: NULL used in arithmetic [-Wpointer-arith]
    if (_strnicmp(str, substr, len) == NULL)
    

関数がNULLを返しているか確認する場合、NULLをキャストする必要がある

if ((int)_strnicmp(str, substr, len) == (int)(void*)NULL)
http://ecl.info.kindai.ac.jp/~zono/blog/2009/04/02/