From: Peter Johnson Date: Mon, 3 Dec 2001 07:37:33 +0000 (-0000) Subject: LCLint-related comment fixes. X-Git-Tag: v0.1.0~143 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f852333dfd8ac335bbceb1bfb54f758d990616d;p=yasm LCLint-related comment fixes. svn path=/trunk/yasm/; revision=387 --- diff --git a/libyasm/bytecode.c b/libyasm/bytecode.c index 93289c6f..d5da45df 100644 --- a/libyasm/bytecode.c +++ b/libyasm/bytecode.c @@ -190,9 +190,11 @@ bc_new_incbin(char *filename, expr *start, expr *maxlen) bytecode *bc = bc_new_common(BC_INCBIN, sizeof(bytecode_incbin)); bytecode_incbin *incbin = bc_get_data(bc); + /*@-mustfree@*/ incbin->filename = filename; incbin->start = start; incbin->maxlen = maxlen; + /*@=mustfree@*/ return bc; } @@ -207,6 +209,7 @@ bc_delete(bytecode *bc) if (!bc) return; + /*@-branchstate@*/ switch (bc->type) { case BC_EMPTY: break; @@ -231,6 +234,7 @@ bc_delete(bytecode *bc) InternalError(_("Unknown bytecode type")); break; } + /*@=branchstate@*/ expr_delete(bc->multiple); xfree(bc); diff --git a/libyasm/bytecode.h b/libyasm/bytecode.h index 523a4b9b..4b223cbb 100644 --- a/libyasm/bytecode.h +++ b/libyasm/bytecode.h @@ -48,7 +48,7 @@ void bc_set_multiple(bytecode *bc, /*@keep@*/ expr *e); /*@only@*/ bytecode *bc_new_common(bytecode_type type, size_t datasize); /*@only@*/ bytecode *bc_new_data(datavalhead *datahead, unsigned char size); -/*@only@*/ bytecode *bc_new_reserve(/*@keep@*/ expr *numitems, +/*@only@*/ bytecode *bc_new_reserve(/*@only@*/ expr *numitems, unsigned char itemsize); /*@only@*/ bytecode *bc_new_incbin(/*@only@*/ char *filename, /*@only@*/ /*@null@*/ expr *start, diff --git a/src/bytecode.c b/src/bytecode.c index 93289c6f..d5da45df 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -190,9 +190,11 @@ bc_new_incbin(char *filename, expr *start, expr *maxlen) bytecode *bc = bc_new_common(BC_INCBIN, sizeof(bytecode_incbin)); bytecode_incbin *incbin = bc_get_data(bc); + /*@-mustfree@*/ incbin->filename = filename; incbin->start = start; incbin->maxlen = maxlen; + /*@=mustfree@*/ return bc; } @@ -207,6 +209,7 @@ bc_delete(bytecode *bc) if (!bc) return; + /*@-branchstate@*/ switch (bc->type) { case BC_EMPTY: break; @@ -231,6 +234,7 @@ bc_delete(bytecode *bc) InternalError(_("Unknown bytecode type")); break; } + /*@=branchstate@*/ expr_delete(bc->multiple); xfree(bc); diff --git a/src/bytecode.h b/src/bytecode.h index 523a4b9b..4b223cbb 100644 --- a/src/bytecode.h +++ b/src/bytecode.h @@ -48,7 +48,7 @@ void bc_set_multiple(bytecode *bc, /*@keep@*/ expr *e); /*@only@*/ bytecode *bc_new_common(bytecode_type type, size_t datasize); /*@only@*/ bytecode *bc_new_data(datavalhead *datahead, unsigned char size); -/*@only@*/ bytecode *bc_new_reserve(/*@keep@*/ expr *numitems, +/*@only@*/ bytecode *bc_new_reserve(/*@only@*/ expr *numitems, unsigned char itemsize); /*@only@*/ bytecode *bc_new_incbin(/*@only@*/ char *filename, /*@only@*/ /*@null@*/ expr *start,