Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialised variable in example program #60

Closed
jpwsutton opened this issue Feb 4, 2016 · 0 comments
Closed

Uninitialised variable in example program #60

jpwsutton opened this issue Feb 4, 2016 · 0 comments

Comments

@jpwsutton
Copy link
Member

migrated from Bugzilla #427181
status RESOLVED severity normal in component MQTT-C for ---
Reported in version v0.5 on platform PC
Assigned to: Ian Craggs

On 2014-02-01 02:22:07 -0500, Michael Andersen wrote:

In the embedded C client for MQTT, the qos0pub.c example doesn't properly initialise the topic string, causing all sorts of mayhem.

The line in question: http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.embedded-c.git/tree/samples/qos0pub.c#n126

Ought to be:
MQTTString topicString = MQTTString_initializer;

Thanks

On 2014-02-01 08:20:42 -0500, Ian Craggs wrote:

Yep, initializing it would be a good idea. By accident, it didn't cause a problem for me, which is why it wasn't initialized. Fixed in master stream.

Thanks.

On 2014-08-21 09:42:17 -0400, Benjamin Cabé wrote:

Please also fix on https://www.eclipse.org/paho/clients/c/embedded/ - I can confirm that this is causing indeed all sorts of mayhem :-)

Bonus points, Ian, if you fix it on your blog too :) http://modelbasedtesting.co.uk/?p=69

On 2014-08-21 17:03:46 -0400, Ian Craggs wrote:

Sorry Benjamin! Should be fixed in both places now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant