Fix warning and small refactoring for __traits(getFunctionAttributes)