Skip to content

incorrect/useless call to printf() in _exit() #47

Closed
@WestfW

Description

@WestfW

in cores/arduino/syscalls_sam3.c, the implementation of _exit() includes:

extern void _exit( int status )
{
    printf( "Exiting with status %d.\n", status ) ;

    for ( ; ; ) ;
}

This causes something like 12k of printf and stdio code to be included in every sketch, and probably doesn't do anything useful since there is no guarantee that the UART has been initialized at all (even assuming that printf() ends up using the skeleton _write() code that is also there...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions