X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=as%2Flink%2Flkaomf51.c;h=7a52f4efd4034c00bfe7c628379e23acc43e2860;hb=f3a44fc094dc5ce393e2029d3c7c6587a4b1a835;hp=80284782c1044765bb1c6f4e02ad5d4ae66735ef;hpb=63c0f2c93557d7e0f6704e9ebf5b5631e7cb48e5;p=fw%2Fsdcc diff --git a/as/link/lkaomf51.c b/as/link/lkaomf51.c index 80284782..7a52f4ef 100644 --- a/as/link/lkaomf51.c +++ b/as/link/lkaomf51.c @@ -18,6 +18,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -------------------------------------------------------------------------*/ +#include #include #include #include @@ -199,8 +200,10 @@ void FreeAll(void) void OutputByte(unsigned char value) { + size_t res; GlobalChkSum+=value; - fwrite( &value, 1, 1, aomf51out ); + res = fwrite( &value, 1, 1, aomf51out ); + assert(res == 1); } void OutputWord(int value) @@ -567,7 +570,9 @@ void CollectInfoFromCDB(void) CurrentModule=0; /*Set the active module as the first one*/ while(!feof(CDBin)) { - fgets(buff, sizeof(buff)-1, CDBin); + char *res; + res = fgets(buff, sizeof(buff)-1, CDBin); + assert(res == buff); if(!feof(CDBin)) switch(buff[0]) {