[ofw] complib\cl_log.h unused function removed compiler warning
Smith, Stan
stan.smith at intel.com
Fri Oct 22 15:39:12 PDT 2010
Hello Tzachi,
If a program includes <complib\comp_lib.h>, which includes cl_log.h, and does not reference the CL_PRINT_TO_EVENT_LOG() macro, the static defined function in cl_log.h __build_str() is not referenced, hence the Windows compiler issues a warning and removes the __build_str() function.
Warning message is cumbersome and in some cases fail the compilation if warnings are treated as errors.
There are a couple of ways to solve this problem, I'm seeking advise on the preferred solution:
1) tag __build_str() as 'inline'
2) remove include of cl_log.h from comp_lib.h, and use cl_log.h with purpose.
3) Use a #pragma to squelch the compiler warning.
your thoughts?
thanks,
stan.
More information about the ofw
mailing list