cmake HAVE_UNUSED_ATTRIBUTE examples

FujiNetWIFI/fujinet-firmware components_pc/libssh/ConfigureChecks.cmake :396

check_c_source_compiles("
    #define __unused __attribute__((unused))

    static int do_nothing(int i __unused)
    {
        return 0;
    }

    int main(void)
    {
        int i;

        i = do_nothing(5);
        if (i > 5) {
            return 1;
        }

        return 0;
    }" HAVE_UNUSED_ATTRIBUTE)

RIKEN-SysSoft/mckernel executer/user/lib/libdwarf/CMakeLists.txt :70

check_c_source_runs("
	static unsigned foo( unsigned x, __attribute__ ((unused)) int y)
	{
		unsigned x2 = x + 1;
		return x2;
	}

	int main(void) {
		unsigned y = 0;
		y = foo(12,y);
		return 0;
	}"
	HAVE_UNUSED_ATTRIBUTE)

RIKEN-SysSoft/mckernel executer/user/lib/libdwarf/CMakeLists.txt :84

message(STATUS "Checking compiler supports __attribute__ unused... ${HAVE_UNUSED_ATTRIBUTE}")