examples/libsmbclient: avoid some compiler warnings
[nivanova/samba-autobuild/.git] / examples / libsmbclient / testctx.c
index cec9776ced2445bf1cb64804df5281e755a091d1..7f27fbd7c9cfbdbe7c252f654de7d2cd0f42b44e 100644 (file)
@@ -1,15 +1,16 @@
 #include <libsmbclient.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 
-void create_and_destroy_context (void)
+static void create_and_destroy_context (void)
 {
   int i;
   SMBCCTX *ctx;
   ctx = smbc_new_context ();
   /* Both should do the same thing */
   smbc_setOptionDebugToStderr(ctx, 1);
-  smbc_option_set(ctx, "debug_to_stderr", 1);
+  smbc_option_set(ctx, strdup("debug_to_stderr"), 1);
   smbc_setDebug(ctx, 1);
   i = smbc_getDebug(ctx);
   if (i != 1) {