Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -157,18 +157,22 @@ AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"]) AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [ OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings" AC_SUBST(NO_CONST_CFSTRINGS, "-fno-constant-cfstrings") ]) +AX_CHECK_COMPILER_FLAGS(-Wsign-compare -Werror, + [OBJCFLAGS="$OBJCFLAGS -Wsign-compare"]) AX_CHECK_COMPILER_FLAGS(-Wshorten-64-to-32 -Werror, [OBJCFLAGS="$OBJCFLAGS -Wshorten-64-to-32"]) AX_CHECK_COMPILER_FLAGS(-Wsemicolon-before-method-body -Werror, [OBJCFLAGS="$OBJCFLAGS -Wsemicolon-before-method-body"]) AX_CHECK_COMPILER_FLAGS(-Wobjc-missing-property-synthesis -Werror, [OBJCFLAGS="$OBJCFLAGS -Wobjc-missing-property-synthesis"]) -AX_CHECK_COMPILER_FLAGS(-Wsign-compare -Werror, - [OBJCFLAGS="$OBJCFLAGS -Wsign-compare"]) +AX_CHECK_COMPILER_FLAGS(-Watomic-properties -Werror, [ + OBJCFLAGS="$OBJCFLAGS -Watomic-properties" + TESTS_OBJCFLAGS="$TESTS_OBJCFLAGS -Wno-atomic-properties" +]) AC_MSG_CHECKING(whether Objective C compiler supports properties) AC_TRY_COMPILE([ @interface Foo { @@ -1469,10 +1473,11 @@ dnl We use the ObjC compiler as our assembler AC_SUBST(AS, $OBJC) AC_SUBST(ASFLAGS) AC_SUBST(AS_DEPENDS, '${OBJC_DEPENDS}') +AC_SUBST(TESTS_OBJCFLAGS) AC_SUBST(TESTS_LIBS) AC_CONFIG_FILES([ buildsys.mk extra.mk Index: extra.mk.in ================================================================== --- extra.mk.in +++ extra.mk.in @@ -52,13 +52,14 @@ RUNTIME_RUNTIME_A = @RUNTIME_RUNTIME_A@ RUNTIME_RUNTIME_LIB_A = @RUNTIME_RUNTIME_LIB_A@ RUN_TESTS = @RUN_TESTS@ TESTPLUGIN = @TESTPLUGIN@ TESTS_LIBS = @TESTS_LIBS@ +TESTS_OBJCFLAGS = @TESTS_OBJCFLAGS@ TEST_LAUNCHER = @TEST_LAUNCHER@ UNICODE_M = @UNICODE_M@ USE_INCLUDES_ATOMIC = @USE_INCLUDES_ATOMIC@ USE_SRCS_FILES = @USE_SRCS_FILES@ USE_SRCS_PLUGINS = @USE_SRCS_PLUGINS@ USE_SRCS_SOCKETS = @USE_SRCS_SOCKETS@ USE_SRCS_THREADS = @USE_SRCS_THREADS@ WEAK_NSFOUNDATIONVERSIONNUMBER = @WEAK_NSFOUNDATIONVERSIONNUMBER@ Index: src/OFCryptoHash.h ================================================================== --- src/OFCryptoHash.h +++ src/OFCryptoHash.h @@ -29,11 +29,11 @@ */ @protocol OFCryptoHash /*! * A boolean whether the hash has already been calculated. */ -@property (readonly, getter=isCalculated) bool calculated; +@property (readonly, nonatomic, getter=isCalculated) bool calculated; /*! * @brief Creates a new cryptographic hash. * * @return A new autoreleased OFCryptoHash Index: src/OFDataArray.h ================================================================== --- src/OFDataArray.h +++ src/OFDataArray.h @@ -42,11 +42,11 @@ } /*! * The size of a single item in the OFDataArray in bytes. */ -@property (readonly) size_t itemSize; +@property (readonly, nonatomic) size_t itemSize; /*! * @brief Creates a new OFDataArray with an item size of 1. * * @return A new autoreleased OFDataArray Index: src/OFHTTPClient.h ================================================================== --- src/OFHTTPClient.h +++ src/OFHTTPClient.h @@ -110,16 +110,17 @@ } /*! * The delegate of the HTTP request. */ -@property OF_NULLABLE_PROPERTY (assign) id delegate; +@property OF_NULLABLE_PROPERTY (nonatomic, assign) + id delegate; /*! * Whether redirects from HTTPS to HTTP will be allowed. */ -@property bool insecureRedirectsAllowed; +@property (nonatomic) bool insecureRedirectsAllowed; /*! * @brief Creates a new OFHTTPClient. * * @return A new, autoreleased OFHTTPClient Index: src/OFHTTPCookie.h ================================================================== --- src/OFHTTPCookie.h +++ src/OFHTTPCookie.h @@ -61,16 +61,16 @@ @property (nonatomic, copy) OFString *path; /*! * Whether the cookie is only to be used with HTTPS. */ -@property (getter=isSecure) bool secure; +@property (nonatomic, getter=isSecure) bool secure; /*! * Whether the cookie is only to be accessed through HTTP. */ -@property (getter=isHTTPOnly) bool HTTPOnly; +@property (nonatomic, getter=isHTTPOnly) bool HTTPOnly; /*! * An array of other attributes. */ @property (readonly, nonatomic) Index: src/OFHTTPRequest.h ================================================================== --- src/OFHTTPRequest.h +++ src/OFHTTPRequest.h @@ -88,11 +88,11 @@ @property (nonatomic, copy) OFURL *URL; /*! * The request method of the HTTP request. */ -@property of_http_request_method_t method; +@property (nonatomic) of_http_request_method_t method; /*! * The headers for the HTTP request. */ @property OF_NULLABLE_PROPERTY (nonatomic, copy) Index: src/OFHTTPResponse.h ================================================================== --- src/OFHTTPResponse.h +++ src/OFHTTPResponse.h @@ -37,11 +37,11 @@ } /*! * The status code of the reply to the HTTP request. */ -@property short statusCode; +@property (nonatomic) short statusCode; /*! * The headers of the reply to the HTTP request. */ @property OF_NULLABLE_PROPERTY (nonatomic, copy) Index: src/OFHTTPServer.h ================================================================== --- src/OFHTTPServer.h +++ src/OFHTTPServer.h @@ -101,16 +101,17 @@ @property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *host; /*! * The port on which the HTTP server will listen. */ -@property uint16_t port; +@property (nonatomic) uint16_t port; /*! * The delegate for the HTTP server. */ -@property OF_NULLABLE_PROPERTY (assign) id delegate; +@property OF_NULLABLE_PROPERTY (nonatomic, assign) + id delegate; /*! * The server name the server presents to clients. * * Setting it to `nil` means no `Server` header will be sent, unless one is Index: src/OFIntrospection.h ================================================================== --- src/OFIntrospection.h +++ src/OFIntrospection.h @@ -50,21 +50,21 @@ } /*! * The selector of the method. */ -@property (readonly) SEL selector; +@property (readonly, nonatomic) SEL selector; /*! * The name of the method. */ @property (readonly, nonatomic) OFString *name; /*! * The type encoding for the method. */ -@property OF_NULLABLE_PROPERTY (readonly) const char *typeEncoding; +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) const char *typeEncoding; - init OF_UNAVAILABLE; @end /*! @@ -99,11 +99,11 @@ * OF_PROPERTY_ATOMIC | The property is declared `atomic` * OF_PROPERTY_WEAK | The property is declared `weak` * OF_PROPERTY_SYNTHESIZED | The property is synthesized * OF_PROPERTY_DYNAMIC | The property is dynamic */ -@property (readonly) unsigned attributes; +@property (readonly, nonatomic) unsigned attributes; /*! * The name of the getter. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *getter; @@ -134,16 +134,16 @@ @property (readonly, nonatomic) OFString *name; /*! * The offset of the instance variable. */ -@property (readonly) ptrdiff_t offset; +@property (readonly, nonatomic) ptrdiff_t offset; /*! * The type encoding for the instance variable. */ -@property OF_NULLABLE_PROPERTY (readonly) const char *typeEncoding; +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) const char *typeEncoding; - init OF_UNAVAILABLE; @end /*! Index: src/OFKernelEventObserver.h ================================================================== --- src/OFKernelEventObserver.h +++ src/OFKernelEventObserver.h @@ -126,11 +126,11 @@ } /*! * The delegate for the OFKernelEventObserver. */ -@property OF_NULLABLE_PROPERTY (assign) +@property OF_NULLABLE_PROPERTY (nonatomic, assign) id delegate; /*! * @brief Creates a new OFKernelEventObserver. * Index: src/OFList.h ================================================================== --- src/OFList.h +++ src/OFList.h @@ -61,16 +61,18 @@ } /*! * The first list object of the list. */ -@property OF_NULLABLE_PROPERTY (readonly) of_list_object_t *firstListObject; +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) + of_list_object_t *firstListObject; /*! * The last list object of the list. */ -@property OF_NULLABLE_PROPERTY (readonly) of_list_object_t *lastListObject; +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) + of_list_object_t *lastListObject; /*! * @brief Creates a new OFList. * * @return A new autoreleased OFList Index: src/OFLocalization.h ================================================================== --- src/OFLocalization.h +++ src/OFLocalization.h @@ -64,11 +64,11 @@ * This is useful to encode strings correctly for passing them to operating * system calls. * * If the native 8-bit encoding is unknown, UTF-8 is assumed. */ -@property (readonly) of_string_encoding_t encoding; +@property (readonly, nonatomic) of_string_encoding_t encoding; /*! * The decimal point of the system's locale. */ @property (readonly, nonatomic) OFString *decimalPoint; Index: src/OFMapTable.h ================================================================== --- src/OFMapTable.h +++ src/OFMapTable.h @@ -77,16 +77,16 @@ } /*! * The key functions used by the map table. */ -@property (readonly) of_map_table_functions_t keyFunctions; +@property (readonly, nonatomic) of_map_table_functions_t keyFunctions; /*! * The object functions used by the map table. */ -@property (readonly) of_map_table_functions_t objectFunctions; +@property (readonly, nonatomic) of_map_table_functions_t objectFunctions; /*! * @brief Creates a new OFMapTable with the specified key and object functions. * * @param keyFunctions A structure of functions for handling keys Index: src/OFMessagePackExtension.h ================================================================== --- src/OFMessagePackExtension.h +++ src/OFMessagePackExtension.h @@ -35,11 +35,11 @@ } /*! * The MessagePack extension type. */ -@property (readonly) int8_t type; +@property (readonly, nonatomic) int8_t type; /*! * @return The data of the extension. */ @property (readonly, nonatomic) OFDataArray *data; Index: src/OFNumber.h ================================================================== --- src/OFNumber.h +++ src/OFNumber.h @@ -148,11 +148,11 @@ } /*! * The type of the number. */ -@property (readonly) of_number_type_t type; +@property (readonly, nonatomic) of_number_type_t type; /*! * @brief Creates a new OFNumber with the specified bool. * * @param bool_ A bool which the OFNumber should contain Index: src/OFOptionsParser.h ================================================================== --- src/OFOptionsParser.h +++ src/OFOptionsParser.h @@ -82,11 +82,11 @@ * If @ref nextOption returned `?` or `:`, this returns the option which was * unknown or for which the argument was missing.@n * If this returns `-`, the last option is only available as a long option (see * lastLongOption). */ -@property (readonly) of_unichar_t lastOption; +@property (readonly, nonatomic) of_unichar_t lastOption; /*! * The long option for the last parsed option, or `nil` if the last parsed * option was not passed as a long option by the user. * Index: src/OFSandbox.h ================================================================== --- src/OFSandbox.h +++ src/OFSandbox.h @@ -40,92 +40,92 @@ bool _allowsSetTime, _allowsPS, _allowsVMInfo; bool _allowsChangingProcessRights, _allowsPF, _allowsAudio, _allowsBPF; } /*! Allows IO operations on previously allocated file descriptors. */ -@property bool allowsStdIO; +@property (nonatomic) bool allowsStdIO; /*! Allows read access to the file system. */ -@property bool allowsReadingFiles; +@property (nonatomic) bool allowsReadingFiles; /*! Allows write access to the file system. */ -@property bool allowsWritingFiles; +@property (nonatomic) bool allowsWritingFiles; /*! Allows creating files in the file system. */ -@property bool allowsCreatingFiles; +@property (nonatomic) bool allowsCreatingFiles; /*! Allows creating special files in the file system. */ -@property bool allowsCreatingSpecialFiles; +@property (nonatomic) bool allowsCreatingSpecialFiles; /*! Allows creating, reading and writing temporary files in /tmp. */ -@property bool allowsTemporaryFiles; +@property (nonatomic) bool allowsTemporaryFiles; /*! Allows using IP sockets. */ -@property bool allowsIPSockets; +@property (nonatomic) bool allowsIPSockets; /*! Allows multicast sockets. */ -@property bool allowsMulticastSockets; +@property (nonatomic) bool allowsMulticastSockets; /*! Allows explicit changes to file attributes. */ -@property bool allowsChangingFileAttributes; +@property (nonatomic) bool allowsChangingFileAttributes; /*! Allows changing ownership of files. */ -@property bool allowsFileOwnerChanges; +@property (nonatomic) bool allowsFileOwnerChanges; /*! Allows file locks. */ -@property bool allowsFileLocks; +@property (nonatomic) bool allowsFileLocks; /*! Allows UNIX sockets. */ -@property bool allowsUNIXSockets; +@property (nonatomic) bool allowsUNIXSockets; /*! Allows syscalls necessary for DNS lookups. */ -@property bool allowsDNS; +@property (nonatomic) bool allowsDNS; /*! Allows to look up users and groups. */ -@property bool allowsUserDatabaseReading; +@property (nonatomic) bool allowsUserDatabaseReading; /*! Allows sending file descriptors via sendmsg(). */ -@property bool allowsFileDescriptorSending; +@property (nonatomic) bool allowsFileDescriptorSending; /*! Allows receiving file descriptors via recvmsg(). */ -@property bool allowsFileDescriptorReceiving; +@property (nonatomic) bool allowsFileDescriptorReceiving; /*! Allows MTIOCGET and MTIOCTOP operations on tape devices. */ -@property bool allowsTape; +@property (nonatomic) bool allowsTape; /*! Allows read-write operations and ioctls on the TTY. */ -@property bool allowsTTY; +@property (nonatomic) bool allowsTTY; /*! Allows various process relationshop operations. */ -@property bool allowsProcessOperations; +@property (nonatomic) bool allowsProcessOperations; /*! Allows execve(). */ -@property bool allowsExec; +@property (nonatomic) bool allowsExec; /*! Allows PROT_EXEC for mmap() and mprotect(). */ -@property bool allowsProtExec; +@property (nonatomic) bool allowsProtExec; /*! Allows settime(). */ -@property bool allowsSetTime; +@property (nonatomic) bool allowsSetTime; /*! Allows introspection of processes on the system. */ -@property bool allowsPS; +@property (nonatomic) bool allowsPS; /*! Allows introspection of the system's virtual memory. */ -@property bool allowsVMInfo; +@property (nonatomic) bool allowsVMInfo; /*! Allows changing the rights of process, for example the UID. */ -@property bool allowsChangingProcessRights; +@property (nonatomic) bool allowsChangingProcessRights; /*! Allows certain ioctls on the PF device. */ -@property bool allowsPF; +@property (nonatomic) bool allowsPF; /*! Allows certain ioctls on audio devices. */ -@property bool allowsAudio; +@property (nonatomic) bool allowsAudio; /*! Allows BIOCGSTATS to collect statistics from a BPF device. */ -@property bool allowsBPF; +@property (nonatomic) bool allowsBPF; /*! * @brief Create a new, autorelease OFSandbox. */ + (instancetype)sandbox; Index: src/OFStream+Private.h ================================================================== --- src/OFStream+Private.h +++ src/OFStream+Private.h @@ -17,9 +17,10 @@ #import "OFStream.h" OF_ASSUME_NONNULL_BEGIN @interface OFStream () -@property (readonly) bool OF_isWaitingForDelimiter; +@property (readonly, nonatomic, getter=OF_isWaitingForDelimiter) + bool OF_waitingForDelimiter; @end OF_ASSUME_NONNULL_END Index: src/OFStream.m ================================================================== --- src/OFStream.m +++ src/OFStream.m @@ -52,11 +52,11 @@ #import "of_asprintf.h" #define MIN_READ_SIZE 512 @implementation OFStream -@synthesize OF_isWaitingForDelimiter = _waitingForDelimiter; +@synthesize OF_waitingForDelimiter = _waitingForDelimiter; #ifndef OF_WINDOWS + (void)initialize { if (self == [OFStream class]) Index: src/OFTCPSocket.h ================================================================== --- src/OFTCPSocket.h +++ src/OFTCPSocket.h @@ -76,11 +76,11 @@ @property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *SOCKS5Host; /*! * The port to use on the SOCKS5 proxy. */ -@property uint16_t SOCKS5Port; +@property (nonatomic) uint16_t SOCKS5Port; /*! * @brief Sets the global SOCKS5 proxy host to use when creating a new socket * * @param SOCKS5Host The host to use as a SOCKS5 proxy when creating a new Index: src/OFTLSSocket.h ================================================================== --- src/OFTLSSocket.h +++ src/OFTLSSocket.h @@ -55,11 +55,12 @@ */ @protocol OFTLSSocket /*! * The delegate for the TLS socket. */ -@property OF_NULLABLE_PROPERTY (assign) id delegate; +@property OF_NULLABLE_PROPERTY (nonatomic, assign) + id delegate; /*! * The path to the X.509 certificate file to use. */ @property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *certificateFile; @@ -73,18 +74,19 @@ * The passphrase to decrypt the PKCS#8 private key file. * * @warning You have to ensure that this is in secure memory protected from * swapping! This is also the reason why this is not an OFString. */ -@property OF_NULLABLE_PROPERTY (assign) const char *privateKeyPassphrase; +@property OF_NULLABLE_PROPERTY (nonatomic, assign) + const char *privateKeyPassphrase; /** * Whether certificate verification is enabled. * * The default is enabled. */ -@property (getter=isCertificateVerificationEnabled) +@property (nonatomic, getter=isCertificateVerificationEnabled) bool certificateVerificationEnabled; /*! * @brief Initializes the TLS socket with the specified TCP socket as its * underlying socket. Index: src/OFTarArchiveEntry.h ================================================================== --- src/OFTarArchiveEntry.h +++ src/OFTarArchiveEntry.h @@ -68,16 +68,16 @@ @property (readonly, nonatomic) OFString *fileName; /*! * The mode of the entry. */ -@property (readonly) uint32_t mode; +@property (readonly, nonatomic) uint32_t mode; /*! * The size of the file. */ -@property (readonly) uint64_t size; +@property (readonly, nonatomic) uint64_t size; /*! * The date of the last modification of the file. */ @property (readonly, nonatomic) OFDate *modificationDate; @@ -85,11 +85,11 @@ /*! * The type of the archive entry. * * See @ref of_tar_archive_entry_type_t. */ -@property (readonly) of_tar_archive_entry_type_t type; +@property (readonly, nonatomic) of_tar_archive_entry_type_t type; /*! * The file name of the target (for a hard link or symbolic link). */ @property (readonly, nonatomic) OFString *targetFileName; @@ -105,16 +105,16 @@ @property (readonly, nonatomic) OFString *group; /*! * The device major (if the file is a device). */ -@property (readonly) uint32_t deviceMajor; +@property (readonly, nonatomic) uint32_t deviceMajor; /*! * The device major (if the file is a device). */ -@property (readonly) uint32_t deviceMinor; +@property (readonly, nonatomic) uint32_t deviceMinor; - init OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END Index: src/OFTimer.h ================================================================== --- src/OFTimer.h +++ src/OFTimer.h @@ -62,21 +62,21 @@ /*! * The time interval in which the timer will repeat, if it is a repeating * timer. */ -@property (readonly) of_time_interval_t timeInterval; +@property (readonly, nonatomic) of_time_interval_t timeInterval; /*! * Whether the timer is repeating. */ -@property (readonly, getter=isRepeating) bool repeating; +@property (readonly, nonatomic, getter=isRepeating) bool repeating; /*! * Whether the timer is valid. */ -@property (readonly, getter=isValid) bool valid; +@property (readonly, nonatomic, getter=isValid) bool valid; /*! * @brief Creates and schedules a new timer with the specified time interval. * * @param timeInterval The time interval after which the timer should be fired Index: src/OFURL.h ================================================================== --- src/OFURL.h +++ src/OFURL.h @@ -44,11 +44,11 @@ @property (nonatomic, copy) OFString *host; /*! * The port part of the URL. */ -@property uint16_t port; +@property (nonatomic) uint16_t port; /*! * The user part of the URL. */ @property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *user; Index: src/OFXMLElementBuilder.h ================================================================== --- src/OFXMLElementBuilder.h +++ src/OFXMLElementBuilder.h @@ -110,11 +110,11 @@ } /*! * The delegate for the OFXMLElementBuilder. */ -@property OF_NULLABLE_PROPERTY (assign) +@property OF_NULLABLE_PROPERTY (nonatomic, assign) id delegate; /*! * @brief Creates a new element builder. * Index: src/OFXMLParser.h ================================================================== --- src/OFXMLParser.h +++ src/OFXMLParser.h @@ -176,20 +176,21 @@ } /*! * The delegate that is used by the XML parser. */ -@property OF_NULLABLE_PROPERTY (assign) id delegate; +@property OF_NULLABLE_PROPERTY (nonatomic, assign) + id delegate; /*! * The depth limit for the XML parser. * * If the depth limit is exceeded, an OFMalformedXMLException is thrown. * * The default is 32. 0 means unlimited (insecure!). */ -@property size_t depthLimit; +@property (nonatomic) size_t depthLimit; /*! * @brief Creates a new XML parser. * * @return A new, autoreleased OFXMLParser Index: src/OFZIPArchiveEntry+Private.h ================================================================== --- src/OFZIPArchiveEntry+Private.h +++ src/OFZIPArchiveEntry+Private.h @@ -17,12 +17,13 @@ #import "OFZIPArchive.h" OF_ASSUME_NONNULL_BEGIN @interface OFZIPArchiveEntry () -@property (readonly) uint16_t OF_lastModifiedFileTime, OF_lastModifiedFileDate; -@property (readonly) int64_t OF_localFileHeaderOffset; +@property (readonly, nonatomic) + uint16_t OF_lastModifiedFileTime, OF_lastModifiedFileDate; +@property (readonly, nonatomic) int64_t OF_localFileHeaderOffset; - (instancetype)OF_initWithStream: (OFStream *)stream OF_METHOD_FAMILY(init); @end OF_ASSUME_NONNULL_END Index: src/OFZIPArchiveEntry.h ================================================================== --- src/OFZIPArchiveEntry.h +++ src/OFZIPArchiveEntry.h @@ -118,20 +118,20 @@ * * The lower 8 bits are the ZIP specification version.@n * The upper 8 bits are the attribute compatibility. * See @ref of_zip_archive_entry_attribute_compatibility. */ -@property (readonly) uint16_t versionMadeBy; +@property (readonly, nonatomic) uint16_t versionMadeBy; /*! * The minimum version required to extract the file. * * The lower 8 bits are the ZIP specification version.@n * The upper 8 bits are the attribute compatibility. * See @ref of_zip_archive_entry_attribute_compatibility. */ -@property (readonly) uint16_t minVersionNeeded; +@property (readonly, nonatomic) uint16_t minVersionNeeded; /*! * The compression method of the entry. * * Supported values are: @@ -141,41 +141,41 @@ * OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_DEFLATE | Deflate * OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_DEFLATE64 | Deflate64 * * Other values may be returned, but the file cannot be extracted then. */ -@property (readonly) uint16_t compressionMethod; +@property (readonly, nonatomic) uint16_t compressionMethod; /*! * The compressed size of the entry's file. */ -@property (readonly) uint64_t compressedSize; +@property (readonly, nonatomic) uint64_t compressedSize; /*! * The uncompressed size of the entry's file. */ -@property (readonly) uint64_t uncompressedSize; +@property (readonly, nonatomic) uint64_t uncompressedSize; /*! * The CRC32 checksum of the entry's file. */ -@property (readonly) uint32_t CRC32; +@property (readonly, nonatomic) uint32_t CRC32; /*! * The version specific attributes. * * The meaning of the version specific attributes depends on the attribute * compatibility part of the version that made the entry. */ -@property (readonly) uint32_t versionSpecificAttributes; +@property (readonly, nonatomic) uint32_t versionSpecificAttributes; /*! * The general purpose bit flag of the entry. * * See the ZIP specification for details. */ -@property (readonly) uint16_t generalPurposeBitFlag; +@property (readonly, nonatomic) uint16_t generalPurposeBitFlag; - init OF_UNAVAILABLE; /*! * @brief Returns the last modification date of the entry's file. Index: src/exceptions/OFAcceptFailedException.h ================================================================== --- src/exceptions/OFAcceptFailedException.h +++ src/exceptions/OFAcceptFailedException.h @@ -40,11 +40,11 @@ @property (readonly, nonatomic) id socket; /*! * @return The errno from when the exception was created. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased accept failed exception. Index: src/exceptions/OFBindFailedException.h ================================================================== --- src/exceptions/OFBindFailedException.h +++ src/exceptions/OFBindFailedException.h @@ -42,21 +42,21 @@ @property (readonly, nonatomic) OFString *host; /*! * The port on which binding failed. */ -@property (readonly) uint16_t port; +@property (readonly, nonatomic) uint16_t port; /*! * The socket which could not be bound. */ @property (readonly, nonatomic) id socket; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased bind failed exception. Index: src/exceptions/OFChangeCurrentDirectoryPathFailedException.h ================================================================== --- src/exceptions/OFChangeCurrentDirectoryPathFailedException.h +++ src/exceptions/OFChangeCurrentDirectoryPathFailedException.h @@ -38,11 +38,11 @@ @property (readonly, nonatomic) OFString *path; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased change current directory path failed Index: src/exceptions/OFChangeOwnerFailedException.h ================================================================== --- src/exceptions/OFChangeOwnerFailedException.h +++ src/exceptions/OFChangeOwnerFailedException.h @@ -46,11 +46,11 @@ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *group; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased change owner failed exception. Index: src/exceptions/OFChangePermissionsFailedException.h ================================================================== --- src/exceptions/OFChangePermissionsFailedException.h +++ src/exceptions/OFChangePermissionsFailedException.h @@ -41,16 +41,16 @@ @property (readonly, nonatomic) OFString *path; /*! * The new permissions for the item. */ -@property (readonly) mode_t permissions; +@property (readonly, nonatomic) mode_t permissions; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased change permissions failed exception. Index: src/exceptions/OFConnectionFailedException.h ================================================================== --- src/exceptions/OFConnectionFailedException.h +++ src/exceptions/OFConnectionFailedException.h @@ -47,16 +47,16 @@ @property (readonly, nonatomic) OFString *host; /*! * The port on the host to which the connection failed. */ -@property (readonly) uint16_t port; +@property (readonly, nonatomic) uint16_t port; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased connection failed exception. Index: src/exceptions/OFCopyItemFailedException.h ================================================================== --- src/exceptions/OFCopyItemFailedException.h +++ src/exceptions/OFCopyItemFailedException.h @@ -41,11 +41,11 @@ @property (readonly, nonatomic) OFString *destinationPath; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased copy item failed exception. Index: src/exceptions/OFCreateDirectoryFailedException.h ================================================================== --- src/exceptions/OFCreateDirectoryFailedException.h +++ src/exceptions/OFCreateDirectoryFailedException.h @@ -37,11 +37,11 @@ @property (readonly, nonatomic) OFString *path; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased create directory failed exception. Index: src/exceptions/OFCreateSymbolicLinkFailedException.h ================================================================== --- src/exceptions/OFCreateSymbolicLinkFailedException.h +++ src/exceptions/OFCreateSymbolicLinkFailedException.h @@ -42,11 +42,11 @@ @property (readonly, nonatomic) OFString *destinationPath; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased create symbolic link failed exception. Index: src/exceptions/OFGetOptionFailedException.h ================================================================== --- src/exceptions/OFGetOptionFailedException.h +++ src/exceptions/OFGetOptionFailedException.h @@ -38,11 +38,11 @@ @property (readonly, nonatomic) OFStream *stream; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased get option failed exception. Index: src/exceptions/OFInvalidJSONException.h ================================================================== --- src/exceptions/OFInvalidJSONException.h +++ src/exceptions/OFInvalidJSONException.h @@ -36,11 +36,11 @@ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *string; /*! * The line in which parsing the JSON representation failed. */ -@property (readonly) size_t line; +@property (readonly, nonatomic) size_t line; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased invalid JSON exception. Index: src/exceptions/OFLinkFailedException.h ================================================================== --- src/exceptions/OFLinkFailedException.h +++ src/exceptions/OFLinkFailedException.h @@ -41,11 +41,11 @@ @property (readonly, nonatomic) OFString *destinationPath; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased link failed exception. Index: src/exceptions/OFListenFailedException.h ================================================================== --- src/exceptions/OFListenFailedException.h +++ src/exceptions/OFListenFailedException.h @@ -40,16 +40,16 @@ @property (readonly, nonatomic) id socket; /*! * The requested back log. */ -@property (readonly) int backLog; +@property (readonly, nonatomic) int backLog; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased listen failed exception. Index: src/exceptions/OFMemoryNotPartOfObjectException.h ================================================================== --- src/exceptions/OFMemoryNotPartOfObjectException.h +++ src/exceptions/OFMemoryNotPartOfObjectException.h @@ -32,11 +32,11 @@ } /*! * A pointer to the memory which is not part of the object. */ -@property (readonly) void *pointer; +@property (readonly, nonatomic) void *pointer; /*! * The object which the memory is not part of. */ @property (readonly, nonatomic) id object; Index: src/exceptions/OFMoveItemFailedException.h ================================================================== --- src/exceptions/OFMoveItemFailedException.h +++ src/exceptions/OFMoveItemFailedException.h @@ -41,11 +41,11 @@ @property (readonly, nonatomic) OFString *destinationPath; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased move item failed exception. Index: src/exceptions/OFNotImplementedException.h ================================================================== --- src/exceptions/OFNotImplementedException.h +++ src/exceptions/OFNotImplementedException.h @@ -32,11 +32,11 @@ } /*! * The selector which is not or not fully implemented. */ -@property (readonly) SEL selector; +@property (readonly, nonatomic) SEL selector; /*! * The object which does not (fully) implement the selector. */ @property (readonly, nonatomic) id object; Index: src/exceptions/OFObserveFailedException.h ================================================================== --- src/exceptions/OFObserveFailedException.h +++ src/exceptions/OFObserveFailedException.h @@ -38,11 +38,11 @@ @property (readonly, nonatomic) OFKernelEventObserver *observer; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased observe failed exception. Index: src/exceptions/OFOpenItemFailedException.h ================================================================== --- src/exceptions/OFOpenItemFailedException.h +++ src/exceptions/OFOpenItemFailedException.h @@ -41,11 +41,11 @@ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *mode; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased open item failed exception. Index: src/exceptions/OFOutOfMemoryException.h ================================================================== --- src/exceptions/OFOutOfMemoryException.h +++ src/exceptions/OFOutOfMemoryException.h @@ -30,11 +30,11 @@ } /*! * The size of the memory that could not be allocated. */ -@property (readonly) size_t requestedSize; +@property (readonly, nonatomic) size_t requestedSize; /*! * @brief Creates a new, autoreleased no memory exception. * * @param requestedSize The size of the memory that could not be allocated Index: src/exceptions/OFReadOrWriteFailedException.h ================================================================== --- src/exceptions/OFReadOrWriteFailedException.h +++ src/exceptions/OFReadOrWriteFailedException.h @@ -38,16 +38,16 @@ @property (readonly, nonatomic) id object; /*! * The requested length of the data that could not be read / written. */ -@property (readonly) size_t requestedLength; +@property (readonly, nonatomic) size_t requestedLength; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased read or write failed exception. Index: src/exceptions/OFRemoveItemFailedException.h ================================================================== --- src/exceptions/OFRemoveItemFailedException.h +++ src/exceptions/OFRemoveItemFailedException.h @@ -36,11 +36,11 @@ @property (readonly, nonatomic) OFString *path; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased remove failed exception. Index: src/exceptions/OFSandboxActivationFailedException.h ================================================================== --- src/exceptions/OFSandboxActivationFailedException.h +++ src/exceptions/OFSandboxActivationFailedException.h @@ -39,11 +39,11 @@ @property (readonly, nonatomic) OFSandbox *sandbox; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased sandboxing failed exception. Index: src/exceptions/OFSeekFailedException.h ================================================================== --- src/exceptions/OFSeekFailedException.h +++ src/exceptions/OFSeekFailedException.h @@ -38,21 +38,21 @@ @property (readonly, nonatomic) OFSeekableStream *stream; /*! * The offset to which seeking failed. */ -@property (readonly) of_offset_t offset; +@property (readonly, nonatomic) of_offset_t offset; /*! * To what the offset is relative. */ -@property (readonly) int whence; +@property (readonly, nonatomic) int whence; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased seek failed exception. Index: src/exceptions/OFSetOptionFailedException.h ================================================================== --- src/exceptions/OFSetOptionFailedException.h +++ src/exceptions/OFSetOptionFailedException.h @@ -38,11 +38,11 @@ @property (readonly, nonatomic) OFStream *stream; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased set option failed exception. Index: src/exceptions/OFStatItemFailedException.h ================================================================== --- src/exceptions/OFStatItemFailedException.h +++ src/exceptions/OFStatItemFailedException.h @@ -36,11 +36,11 @@ @property (readonly, nonatomic) OFString *path; /*! * The errno of the error that occurred. */ -@property (readonly) int errNo; +@property (readonly, nonatomic) int errNo; + (instancetype)exception OF_UNAVAILABLE; /*! * @brief Creates a new, autoreleased stat item failed exception. Index: src/exceptions/OFThreadStillRunningException.h ================================================================== --- src/exceptions/OFThreadStillRunningException.h +++ src/exceptions/OFThreadStillRunningException.h @@ -36,11 +36,11 @@ } /*! * The thread which is still running. */ -@property OF_NULLABLE_PROPERTY (readonly, retain) OFThread *thread; +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFThread *thread; /*! * @brief Creates a new, autoreleased thread still running exception. * * @param thread The thread which is still running Index: tests/Makefile ================================================================== --- tests/Makefile +++ tests/Makefile @@ -148,8 +148,9 @@ ${PROG_NOINST}.3dsx: ${PROG_NOINST} 3dsxtool $< $@ CPPFLAGS += -I../src -I../src/exceptions -I../src/runtime -I.. -DSTDOUT +OBJCFLAGS += ${TESTS_OBJCFLAGS} LIBS := -L../src -lobjfw ${TESTS_LIBS} ${LIBS} LDFLAGS += ${MAP_LDFLAGS} LD = ${OBJC} Index: tests/OFObjectTests.m ================================================================== --- tests/OFObjectTests.m +++ tests/OFObjectTests.m @@ -52,25 +52,25 @@ unsigned long long _unsignedLongLongValue; float _floatValue; double _doubleValue; } -@property (retain) id objectValue; -@property Class classValue; -@property (getter=isBoolValue) bool boolValue; -@property char charValue; -@property short shortValue; -@property int intValue; -@property long longValue; -@property long long longLongValue; -@property unsigned char unsignedCharValue; -@property unsigned short unsignedShortValue; -@property unsigned int unsignedIntValue; -@property unsigned long unsignedLongValue; -@property unsigned long long unsignedLongLongValue; -@property float floatValue; -@property double doubleValue; +@property (nonatomic, retain) id objectValue; +@property (nonatomic) Class classValue; +@property (nonatomic, getter=isBoolValue) bool boolValue; +@property (nonatomic) char charValue; +@property (nonatomic) short shortValue; +@property (nonatomic) int intValue; +@property (nonatomic) long longValue; +@property (nonatomic) long long longLongValue; +@property (nonatomic) unsigned char unsignedCharValue; +@property (nonatomic) unsigned short unsignedShortValue; +@property (nonatomic) unsigned int unsignedIntValue; +@property (nonatomic) unsigned long unsignedLongValue; +@property (nonatomic) unsigned long long unsignedLongLongValue; +@property (nonatomic) float floatValue; +@property (nonatomic) double doubleValue; @end @implementation MyObj @synthesize objectValue = _objectValue, classValue = _classValue; @synthesize boolValue = _boolValue, charValue = _charValue;