Question

In an Xcode 5, ARC, iPhone project, I have received a large number of warnings reading "No 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed." I know what this warning means, and why I might want to fix it. But this would take a long time given the size of my project, so I instead want to suppress the warning. However, setting the -Wno-property-no-attribute flag on all of my .m files didn't fix anything, nor did setting the flag at Custom Compiler Flags > Other Warning Flags. I also tried #pragma GCC/clang diagnostic ignored "-Wproperty-no-attribute" before my property declarations, and have cleaned my build folder many times. The warnings persist. (Also, the -w flag did not work to suppress all warnings, when applied to my .m files.)

What should I do?

Was it helpful?

Solution 2

It turned out that I had made a small typo in the Custom Compiler Flags entry (although I still do not know why the file-per-file flags didn't work), and that the LLVM warning about this was almost invisible, being swamped in the hundreds of other warnings generated.

OTHER TIPS

The pragma statement should be this: #pragma clang diagnostic ignored "-Wobjc-property-no-attribute"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top