X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fmetadata%2Fctf-visitor-generate-io-struct.c;h=559e97ecdf65b778034dbf28914036f79003b90d;hp=7cc84953c1533f2ecab6604d953ebf9ab830a6a5;hb=be59aa1005711f38937aaf0f727374b4d092b354;hpb=08c82b90d94a6dfee1f3da4ec06864c6045c07f7 diff --git a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c index 7cc84953..559e97ec 100644 --- a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c +++ b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c @@ -14,6 +14,14 @@ * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ #include @@ -823,7 +831,6 @@ struct declaration *ctf_declaration_struct_visit(FILE *fd, { struct declaration_struct *struct_declaration; struct ctf_node *iter; - int ret; /* * For named struct (without body), lookup in @@ -851,6 +858,8 @@ struct declaration *ctf_declaration_struct_visit(FILE *fd, } } if (!bt_list_empty(min_align)) { + int ret; + ret = get_unary_unsigned(min_align, &min_align_value); if (ret) { fprintf(fd, "[error] %s: unexpected unary expression for structure \"align\" attribute\n", __func__); @@ -861,12 +870,16 @@ struct declaration *ctf_declaration_struct_visit(FILE *fd, struct_declaration = struct_declaration_new(declaration_scope, min_align_value); bt_list_for_each_entry(iter, declaration_list, siblings) { + int ret; + ret = ctf_struct_declaration_list_visit(fd, depth + 1, iter, struct_declaration, trace); if (ret) goto error_free_declaration; } if (name) { + int ret; + ret = register_struct_declaration(g_quark_from_string(name), struct_declaration, declaration_scope); @@ -2351,6 +2364,7 @@ int ctf_clock_declaration_visit(FILE *fd, int depth, struct ctf_node *node, goto error; } clock->absolute = ret; + ret = 0; } else { fprintf(fd, "[warning] %s: attribute \"%s\" is unknown in clock declaration.\n", __func__, left); }