ObjFW  Check-in [31d023e401]

Overview
Comment:Fix Clang warnings and a typo.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 31d023e401d3fdfa42707e373e890964452c9eb684fdc419289076da9baddc2f
User & Date: js on 2012-12-06 21:17:55
Other Links: manifest | tags
Context
2012-12-07
02:11
Make GCC happy by declaring private methods. check-in: bff1f8e5a7 user: js tags: trunk
2012-12-06
21:17
Fix Clang warnings and a typo. check-in: 31d023e401 user: js tags: trunk
16:38
OFXMLElement: Add a few new methods. check-in: 961f0da8a1 user: js tags: trunk
Changes

Modified src/OFObject.m from [af5fd55d36] to [0307a15aa9].

237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
#elif defined(OF_HAVE_RANDOM)
	static BOOL initialized = NO;

	if (!initialized) {
		struct timeval t;

		gettimeofday(&t, NULL);
		srandom(t.tv_sec ^ t.tv_usec);
		initialized = YES;
	}

	return (random() << 16) | (random() & 0xFFFF);
#else
	static BOOL initialized = NO;

	if (!initialized) {
		struct timeval t;

		gettimeofday(&t, NULL);
		srand(t.tv_sec ^ t.tv_usec);
		initialized = YES;
	}

	return (random() << 16) | (random() & 0xFFFF);
#endif
}

const char*
_NSPrintForDebugger(id object)
{
	return [[object description]







|



|







|



|







237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
#elif defined(OF_HAVE_RANDOM)
	static BOOL initialized = NO;

	if (!initialized) {
		struct timeval t;

		gettimeofday(&t, NULL);
		srandom((unsigned)(t.tv_sec ^ t.tv_usec));
		initialized = YES;
	}

	return (uint32_t)((random() << 16) | (random() & 0xFFFF));
#else
	static BOOL initialized = NO;

	if (!initialized) {
		struct timeval t;

		gettimeofday(&t, NULL);
		srand((unsigned)(t.tv_sec ^ t.tv_usec));
		initialized = YES;
	}

	return (rand() << 16) | (rand() & 0xFFFF);
#endif
}

const char*
_NSPrintForDebugger(id object)
{
	return [[object description]