summaryrefslogtreecommitdiffstats
path: root/examples/libsmbclient/testctx.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-02-27 09:39:20 +0100
committerAndrew Bartlett <abartlet@samba.org>2014-04-02 09:03:42 +0200
commitc8519003a34dc7db44854a3d844d1c7432d52a78 (patch)
tree4a7126b77e0ec69dc189be276e022ed0e5531e75 /examples/libsmbclient/testctx.c
parent0b757c9bcfbe1e8db2c3f33f1a57d02d75c3186a (diff)
downloadsamba-c8519003a34dc7db44854a3d844d1c7432d52a78.tar.gz
samba-c8519003a34dc7db44854a3d844d1c7432d52a78.tar.xz
samba-c8519003a34dc7db44854a3d844d1c7432d52a78.zip
examples/libsmbclient: avoid some compiler warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'examples/libsmbclient/testctx.c')
-rw-r--r--examples/libsmbclient/testctx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/libsmbclient/testctx.c b/examples/libsmbclient/testctx.c
index cec9776ced..7f27fbd7c9 100644
--- a/examples/libsmbclient/testctx.c
+++ b/examples/libsmbclient/testctx.c
@@ -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) {