ObjFW  Check-in [a5ab6bf63b]

Overview
Comment:Add -Wwrite-strings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a5ab6bf63b40bca8591c87c3a3932554fec45e4123fc09b5038f0d0d2a3d9b88
User & Date: js on 2011-02-09 22:12:40
Other Links: manifest | tags
Context
2011-02-10
01:20
More work on the PSP port.
Links and runs now, but does not show any output yet.
check-in: 423353cdc1 user: js tags: trunk
2011-02-09
22:12
Add -Wwrite-strings. check-in: a5ab6bf63b user: js tags: trunk
19:34
More changes to port ObjFW to PSP. check-in: 33f646ce2d user: js tags: trunk
Changes

Modified configure.ac from [6472ce0463] to [5d5c9c371f].

441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
AS_IF([test x"$objc_runtime" = x"Apple"], [
	AC_CHECK_HEADER(Foundation/NSObject.h, [
		AC_SUBST(FOUNDATION_COMPAT_M, "foundation-compat.m")
	])
])

AS_IF([test x"$GOBJC" = x"yes"], [
	OBJCFLAGS="$OBJCFLAGS -Werror"

	AC_MSG_CHECKING(whether gcc has bug objc/27438)
	AC_TRY_COMPILE([
		#import <objc/objc.h>

		@interface OFConstantString
		{







|







441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
AS_IF([test x"$objc_runtime" = x"Apple"], [
	AC_CHECK_HEADER(Foundation/NSObject.h, [
		AC_SUBST(FOUNDATION_COMPAT_M, "foundation-compat.m")
	])
])

AS_IF([test x"$GOBJC" = x"yes"], [
	OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Werror"

	AC_MSG_CHECKING(whether gcc has bug objc/27438)
	AC_TRY_COMPILE([
		#import <objc/objc.h>

		@interface OFConstantString
		{

Modified src/OFHTTPRequest.m from [38ccb7c9e6] to [ef4afd4934].

123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
	@try {
		OFString *line;
		OFMutableDictionary *s_headers;
		OFDataArray *data;
		OFEnumerator *enumerator;
		OFString *key;
		int status;
		char *t;

		if (requestType == OF_HTTP_REQUEST_TYPE_GET)
			t = "GET";
		if (requestType == OF_HTTP_REQUEST_TYPE_HEAD)
			t = "HEAD";
		if (requestType == OF_HTTP_REQUEST_TYPE_POST)
			t = "POST";







|







123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
	@try {
		OFString *line;
		OFMutableDictionary *s_headers;
		OFDataArray *data;
		OFEnumerator *enumerator;
		OFString *key;
		int status;
		const char *t;

		if (requestType == OF_HTTP_REQUEST_TYPE_GET)
			t = "GET";
		if (requestType == OF_HTTP_REQUEST_TYPE_HEAD)
			t = "HEAD";
		if (requestType == OF_HTTP_REQUEST_TYPE_POST)
			t = "POST";

Modified src/OFString+XMLEscaping.m from [4792013d52] to [1f539677cd].

24
25
26
27
28
29
30
31

32
33
34
35
36
37
38
#import "OFExceptions.h"

int _OFString_XMLEscaping_reference;

@implementation OFString (XMLEscaping)
- (OFString*)stringByXMLEscaping
{
	char *str_c, *append, *tmp;

	size_t len, append_len;
	size_t i, j;
	OFString *ret;

	j = 0;
	len = length;








|
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#import "OFExceptions.h"

int _OFString_XMLEscaping_reference;

@implementation OFString (XMLEscaping)
- (OFString*)stringByXMLEscaping
{
	char *str_c, *tmp;
	const char *append;
	size_t len, append_len;
	size_t i, j;
	OFString *ret;

	j = 0;
	len = length;