diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2011-03-02 10:16:34 +0100 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2011-03-02 10:16:34 +0100 |
commit | c9dda80130c9b00e8df6275da38c3276b0ebf55d (patch) | |
tree | 6eaf5a46e29c4b9bab69f32f76bbbe6dbc719682 | |
parent | 3b1a1a0aa7a21aa10af4563b2bdbeb4b65533ed0 (diff) | |
download | mariadb-git-c9dda80130c9b00e8df6275da38c3276b0ebf55d.tar.gz |
Fix non-portable test of %p in unit test my_vsnprintf
-rw-r--r-- | unittest/mysys/my_vsnprintf-t.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/unittest/mysys/my_vsnprintf-t.c b/unittest/mysys/my_vsnprintf-t.c index e7f37774f85..7f93f5bb195 100644 --- a/unittest/mysys/my_vsnprintf-t.c +++ b/unittest/mysys/my_vsnprintf-t.c @@ -110,8 +110,11 @@ int main(void) test1("Positional arguments octal: <7777>", "Positional arguments octal: <%1$o>", 07777); + /* Can't use int arguments, as they may be different size from pointers */ + test1("Padding and %p <0x12> <0x034> <0x0000ab> < 0xcd>", - "Padding and %%p <%04p> <%05p> <%08p> <%8p>", 0x12, 0x34, 0xab, 0xcd); + "Padding and %%p <%04p> <%05p> <%08p> <%8p>", + (void*) 0x12, (void*) 0x34, (void*) 0xab, (void*) 0xcd); test1("F with a width (ignored) and precision: <12.34568>", "F with a width (ignored) and precision: <%10.5f>", 12.3456789); |