mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
avoid some compiler warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@32487 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4428ee9679
commit
0c983b6862
3 changed files with 8 additions and 5 deletions
|
@ -2,6 +2,9 @@
|
|||
|
||||
* TestFramework/Testing.h:
|
||||
Change macro argument names to make collisions almost impossible.
|
||||
* TestFramework/ObjectTesting.h:
|
||||
* TestFramework/Testing.h:
|
||||
Tweak to avoid some warnings on openbsd.
|
||||
|
||||
2011-03-06 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ static void test_NSCoding(NSArray *objects)
|
|||
NSArchiver *archiver;
|
||||
id decoded;
|
||||
|
||||
sprintf(buf, "test_NSCoding object %u", i);
|
||||
snprintf(buf, sizeof(buf), "test_NSCoding object %u", i);
|
||||
START_SET(buf)
|
||||
pass([[[obj class] description] length],
|
||||
"I can extract a class name for object");
|
||||
|
@ -252,7 +252,7 @@ static void test_keyed_NSCoding(NSArray *objects)
|
|||
NSData *data;
|
||||
id decoded;
|
||||
|
||||
sprintf(buf, "test_keyed_NSCoding object %u", i);
|
||||
snprintf(buf, sizeof(buf), "test_keyed_NSCoding object %u", i);
|
||||
START_SET(buf)
|
||||
pass([[[obj class] description] length],
|
||||
"I can extract a class name for object");
|
||||
|
@ -294,7 +294,7 @@ static void test_NSCopying(NSString *iClassName,
|
|||
Class theClass = Nil;
|
||||
id theObj = [objects objectAtIndex: i];
|
||||
|
||||
sprintf(buf, "test_NSCopying object %u", i);
|
||||
snprintf(buf, sizeof(buf), "test_NSCopying object %u", i);
|
||||
START_SET(buf)
|
||||
if (iClass != mClass && [theObj isKindOfClass: mClass])
|
||||
{
|
||||
|
@ -389,7 +389,7 @@ static void test_NSMutableCopying(NSString *iClassName,
|
|||
id theCopy = nil;
|
||||
Class theClass = Nil;
|
||||
|
||||
sprintf(buf, "test_NSMutableCopying object %u", i);
|
||||
snprintf(buf, sizeof(buf), "test_NSMutableCopying object %u", i);
|
||||
START_SET(buf);
|
||||
if (iClass == mClass && [theObj isKindOfClass: mClass])
|
||||
immutable = NO;
|
||||
|
|
|
@ -315,7 +315,7 @@ static void testStart()
|
|||
unsigned _save_indentation = testIndentation; \
|
||||
int _save_line = __LINE__; \
|
||||
char *_save_set = malloc(strlen(setName) + 1); \
|
||||
strcpy(_save_set, setName); \
|
||||
strncpy(_save_set, setName, strlen(setName) + 1); \
|
||||
fprintf(stderr, "Start set: "); \
|
||||
testIndent(); \
|
||||
fprintf(stderr, "%s:%d ... %s\n", __FILE__, __LINE__, _save_set); \
|
||||
|
|
Loading…
Reference in a new issue