Merge pull request #192 from YashasSamaga/i187-fix
remove extra new lines from #warning and #pragma deprecated
This commit is contained in:
commit
a0c994493d
@ -1122,8 +1122,10 @@ static int command(void)
|
|||||||
while (*lptr<=' ' && *lptr!='\0')
|
while (*lptr<=' ' && *lptr!='\0')
|
||||||
lptr++;
|
lptr++;
|
||||||
pc_deprecate=(char*)malloc(strlen((char*)lptr)+1);
|
pc_deprecate=(char*)malloc(strlen((char*)lptr)+1);
|
||||||
if (pc_deprecate!=NULL)
|
if (pc_deprecate!=NULL) {
|
||||||
strcpy(pc_deprecate,(char*)lptr);
|
strcpy(pc_deprecate,lptr);
|
||||||
|
pc_deprecate[strcspn(pc_deprecate,"\r\n")]='\0';
|
||||||
|
} /* if */
|
||||||
lptr=(unsigned char*)strchr((char*)lptr,'\0'); /* skip to end (ignore "extra characters on line") */
|
lptr=(unsigned char*)strchr((char*)lptr,'\0'); /* skip to end (ignore "extra characters on line") */
|
||||||
} else if (strcmp(str,"dynamic")==0) {
|
} else if (strcmp(str,"dynamic")==0) {
|
||||||
preproc_expr(&pc_stksize,NULL);
|
preproc_expr(&pc_stksize,NULL);
|
||||||
@ -1491,8 +1493,17 @@ static int command(void)
|
|||||||
case tpWARNING:
|
case tpWARNING:
|
||||||
while (*lptr<=' ' && *lptr!='\0')
|
while (*lptr<=' ' && *lptr!='\0')
|
||||||
lptr++;
|
lptr++;
|
||||||
if (!SKIPPING)
|
if (!SKIPPING) {
|
||||||
error(237,lptr); /* user warning */
|
char *usermsg=(char*)malloc(strlen(lptr)+1);
|
||||||
|
if(usermsg!=NULL) {
|
||||||
|
strcpy(usermsg,lptr);
|
||||||
|
usermsg[strcspn(usermsg,"\r\n")]='\0';
|
||||||
|
error(237,usermsg); /* user warning */
|
||||||
|
free(usermsg);
|
||||||
|
} else {
|
||||||
|
error(237,lptr);
|
||||||
|
} /* if */
|
||||||
|
} /* if */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error(31); /* unknown compiler directive */
|
error(31); /* unknown compiler directive */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user