23-03-2015, 09:26 AM
The unused macro in "header" files are also a violation of this rule. explanation below:
File.h:
================
#define abc 10
================
Case1:
File1.c include file.h but does not use abc
Is this a violation.
Case2:
File1.c include file.h but does not use abc
File2.c includes file.h and uses abc
Is this a violation with respect to file1.c as it includes the header file but does not uses the macro.
File.h:
================
#define abc 10
================
Case1:
File1.c include file.h but does not use abc
Is this a violation.
Case2:
File1.c include file.h but does not use abc
File2.c includes file.h and uses abc
Is this a violation with respect to file1.c as it includes the header file but does not uses the macro.
<t></t>