Skip to content

Holy Cow……Clang Diagnostic

After upgraded my Xcode to 8.3, it bump up lots of errors.

All about Clang Diagnostic. I try to fix most of them. In the end I give up…

Just change settings in Engine/Source/Runtime/Core/Public/Mac/MacPlatformCompilerPreSetup.h

Add

#pragma clang diagnostic ignored "-Wnullability-inferred-on-nested-type"
#pragma clang diagnostic ignored "-Wobjc-protocol-property-synthesis"
#ifndef PRAGMA_DISABLE_UNDEFINED_IDENTIFIER_WARNINGS
#define PRAGMA_DISABLE_UNDEFINED_IDENTIFIER_WARNINGS \
	_Pragma("clang diagnostic push") \
	_Pragma("clang diagnostic ignored \"-Wundef\"") \
        _Pragma("clang diagnostic ignored \"-Wnull-dereference\"")
#endif // PRAGMA_DISABLE_UNDEFINED_IDENTIFIER_WARNINGS

Err logs:

Showing All Messages
/Users/liber/UE4/UnrealEngine/Engine/Source/Runtime/Apple/MetalRHI/Private/MetalDebugCommandEncoder.h:62:5: error: inferring '_Nonnull' for pointer type within array is deprecated [-Werror,-Wnullability-inferred-on-nested-type]


    id<MTLSamplerState> Samplers[ML_MaxSamplers];


    ^


       _Nonnull 


In file included from /Users/liber/UE4/UnrealEngine/Engine/Intermediate/Build/Mac/UE4Editor/Development/DestructibleMeshEditor/Module.DestructibleMeshEditor.cpp:5:


In file included from /Users/liber/UE4/UnrealEngine/Engine/Source/Editor/DestructibleMeshEditor/Private/SDestructibleMeshEditorViewport.cpp:17:


In file included from Editor/UnrealEd/Private/FbxImporter.h:78:


In file included from ThirdParty/FBX/2016.1.1/include/fbxsdk.h:98:


In file included from ThirdParty/FBX/2016.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:


In file included from ThirdParty/FBX/2016.1.1/include/fbxsdk/core/fbxplugin.h:20:


In file included from ThirdParty/FBX/2016.1.1/include/fbxsdk/core/fbxobject.h:21:


------------

Showing All Messages
ThirdParty/FBX/2016.1.1/include/fbxsdk/core/fbxproperty.h:1242:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]


                return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);


                                                                                   ^~~~~~~~~~~~~~~~~~~


In file included from /Users/liber/UE4/UnrealEngine/Engine/Intermediate/Build/Mac/UE4Editor/Development/MetalRHI/Module.MetalRHI.cpp:4:


Showing All Messages
ThirdParty/FBX/2016.1.1/include/fbxsdk/core/fbxproperty.h:1242:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]


                return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);


                                                                                   ^~~~~~~~~~~~~~~~~~~


In file included from /Users/liber/UE4/UnrealEngine/Engine/Intermediate/Build/Mac/UE4Editor/Development/MovieSceneTools/Module.MovieSceneTools.cpp:16:


In file included from /Users/liber/UE4/UnrealEngine/Engine/Source/Editor/MovieSceneTools/Private/MovieSceneToolHelpers.cpp:29:


In file included from Editor/UnrealEd/Private/FbxImporter.h:78:


In file included from ThirdParty/FBX/2016.1.1/include/fbxsdk.h:98:


In file included from ThirdParty/FBX/2016.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:


In file included from ThirdParty/FBX/2016.1.1/include/fbxsdk/core/fbxplugin.h:20:


In file included from ThirdParty/FBX/2016.1.1/include/fbxsdk/core/fbxobject.h:21:



-------

Showing All Messages
/Users/liber/UE4/UnrealEngine/Engine/Source/Runtime/Apple/MetalRHI/Private/MetalCommandBuffer.cpp:31:17: error: auto property synthesis will not synthesize property 'kernelEndTime' declared in protocol 'MTLCommandBuffer' [-Werror,-Wobjc-protocol-property-synthesis]


@implementation FMetalDebugCommandBuffer


                ^


/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h:122:37: note: property declared here


@property (readonly) CFTimeInterval kernelEndTime NS_AVAILABLE_IOS(10_3);


                                    ^


In file included from /Users/liber/UE4/UnrealEngine/Engine/Intermediate/Build/Mac/UE4Editor/Development/MetalRHI/Module.MetalRHI.cpp:4:


---------

Showing All Messages
/Users/liber/UE4/UnrealEngine/Engine/Source/Runtime/Apple/MetalRHI/Private/MetalRenderCommandEncoder.cpp:118:59: Array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

- (void)setVertexBuffers:(const id <MTLBuffer> __nullable [])buffers offsets:(const NSUInteger [])offsets withRange:(NSRange)range


                                                          ^


/Users/liber/UE4/UnrealEngine/Engine/Source/Runtime/Apple/MetalRHI/Private/MetalRenderCommandEncoder.cpp:118:59: Insert '_Nullable' if the array parameter may be null

- (void)setVertexBuffers:(const id <MTLBuffer> __nullable [])buffers offsets:(const NSUInteger [])offsets withRange:(NSRange)range


                                                          ^


                                                           _Nullable


/Users/liber/UE4/UnrealEngine/Engine/Source/Runtime/Apple/MetalRHI/Private/MetalRenderCommandEncoder.cpp:118:59: Insert '_Nonnull' if the array parameter should never be null

- (void)setVertexBuffers:(const id <MTLBuffer> __nullable [])buffers offsets:(const NSUInteger [])offsets withRange:(NSRange)range


                                                          ^


                                                           _Nonnull


 

Published inUnrealEngine

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

http://next.sh/wp-content/smilies/icon_confused.gif 
http://next.sh/wp-content/smilies/icon_cool.gif 
http://next.sh/wp-content/smilies/icon_cry.gif 
http://next.sh/wp-content/smilies/icon_eek.gif 
http://next.sh/wp-content/smilies/icon_evil.gif 
http://next.sh/wp-content/smilies/icon_exclaim.gif 
http://next.sh/wp-content/smilies/icon_idea.gif 
http://next.sh/wp-content/smilies/icon_mad.gif 
http://next.sh/wp-content/smilies/icon_mrgreen.gif 
http://next.sh/wp-content/smilies/icon_neutral.gif 
http://next.sh/wp-content/smilies/icon_question.gif 
http://next.sh/wp-content/smilies/icon_razz.gif 
http://next.sh/wp-content/smilies/icon_redface.gif 
http://next.sh/wp-content/smilies/icon_rolleyes.gif 
http://next.sh/wp-content/smilies/icon_sad.gif 
http://next.sh/wp-content/smilies/icon_smile.gif 
http://next.sh/wp-content/smilies/icon_arrow.gif 
http://next.sh/wp-content/smilies/icon_biggrin.gif 
http://next.sh/wp-content/smilies/icon_surprised.gif 
http://next.sh/wp-content/smilies/icon_twisted.gif 
http://next.sh/wp-content/smilies/10.gif 
http://next.sh/wp-content/smilies/102.gif 
http://next.sh/wp-content/smilies/103.gif 
http://next.sh/wp-content/smilies/106.gif 
http://next.sh/wp-content/smilies/108.gif 
http://next.sh/wp-content/smilies/20.gif 
http://next.sh/wp-content/smilies/26.gif 
http://next.sh/wp-content/smilies/37.gif 
http://next.sh/wp-content/smilies/99.gif