Hi;

My code below give me two warnings when compile with gcc, also it has no effect during execution. Warnings are :

- warning: 'naked' attribute directive ignored [-Wattributes]
- warning: no return statement in function returning non-void [-Wreturn-type]

Code:
void __declspec(naked) *ker_adr()
{
    asm("mov eax, fs:[0x30]\n");
    asm("mov eax, [eax+0x0c]\n");
    asm("mov eax, [eax+0x1c]\n");
    asm("mov eax, [eax]\n");
    asm("mov eax, [eax+0x08]\n");
    asm("ret\n");
}
Regards