ARMmbed / mbed-os-example-cellular

This is an example based on mbed-os cellular APIs that demonstrates a TCP or UDP echo transaction with a public echo server.
Apache License 2.0
21 stars 45 forks source link

Fix PLMN trace for IAR #127

Closed kivaisan closed 5 years ago

kivaisan commented 5 years ago

IAR 8.32 does not support printing null string.

This is a fix for https://github.com/ARMmbed/mbed-os-example-cellular/issues/125

kjbracey commented 5 years ago

Pedant alert.

"Null string" is a slightly fuzzy concept. You're not printing a null string here.

A C string is a zero-terminated array of characters. A null string would be an empty one. This is passing an invalid pointer to someone expecting a pointer to a string.

C standard requires that %s gets a pointer to a string, but many C libraries are friendly and also accept null pointers.

cmonr commented 5 years ago

@kivaisan Shouldn't this be targeting the 5.12 branch?

kivaisan commented 5 years ago

Ok. I'll close this one and I created a new PR to 5.12 branch (https://github.com/ARMmbed/mbed-os-example-cellular/pull/128)