r25766: pidl: fix bugs in ndr_tagtype tests found by compiler warnings
authorStefan Metzmacher <metze@samba.org>
Wed, 31 Oct 2007 15:27:21 +0000 (16:27 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:43:50 +0000 (05:43 +0100)
metze
(This used to be commit 34af31cfb3b69d1028027da1bceb06b41103e7aa)

source4/pidl/tests/ndr_tagtype.pl

index f8250a90efd78576b8681f52756b980ad063949c..38daa02ab472b26251f3db1b424fd5a8b4504700 100755 (executable)
@@ -30,13 +30,13 @@ test_samba4_ndr('struct-notypedef-used', '[public] struct bla { uint8 x; };
        [public] void myfn([in] struct bla r); ',
 '
        struct ndr_push *ndr = ndr_push_init_ctx(NULL);
-       struct bla r;
+       struct myfn fn;
        uint8_t expected[] = { 0x0D };
        DATA_BLOB expected_blob = { expected, 1 };
        DATA_BLOB result_blob;
-       r.x = 13;
+       fn.in.r.x = 13;
 
-       if (NT_STATUS_IS_ERR(ndr_push_myfn(ndr, NDR_IN, &r)))
+       if (NT_STATUS_IS_ERR(ndr_push_myfn(ndr, NDR_IN, &fn)))
                return 1;
 
        result_blob = ndr_push_blob(ndr);
@@ -47,16 +47,16 @@ test_samba4_ndr('struct-notypedef-used', '[public] struct bla { uint8 x; };
 
 
 test_samba4_ndr('struct-notypedef-embedded', 'struct bla { uint8 x; };
-       [public] struct myfn { struct bla r; }; ',
+       [public] struct myst { struct bla r; }; ',
 '
        struct ndr_push *ndr = ndr_push_init_ctx(NULL);
-       struct bla r;
+       struct myst st;
        uint8_t expected[] = { 0x0D };
        DATA_BLOB expected_blob = { expected, 1 };
        DATA_BLOB result_blob;
-       r.x = 13;
+       st.r.x = 13;
 
-       if (NT_STATUS_IS_ERR(ndr_push_STRUCT_myfn(ndr, NDR_IN, &r)))
+       if (NT_STATUS_IS_ERR(ndr_push_STRUCT_myst(ndr, NDR_IN, &st)))
                return 1;
 
        result_blob = ndr_push_blob(ndr);