[rtems commit] nfsclient: Avoid __FILE__ and __LINE__

Gedare Bloom gedare at rtems.org
Fri Dec 5 13:49:04 UTC 2014


Should we avoid these macros in general, and say so in coding conventions?

On Fri, Dec 5, 2014 at 7:10 AM, Sebastian Huber <sebh at rtems.org> wrote:
> Module:    rtems
> Branch:    master
> Commit:    b657ea4d33ca47d1bf714906ecc4073c1441c620
> Changeset: http://git.rtems.org/rtems/commit/?id=b657ea4d33ca47d1bf714906ecc4073c1441c620
>
> Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
> Date:      Fri Dec  5 13:05:34 2014 +0100
>
> nfsclient: Avoid __FILE__ and __LINE__
>
> The __FILE__ prevents reproducible builds.
>
> ---
>
>  cpukit/libfs/src/nfsclient/src/rpcio.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/cpukit/libfs/src/nfsclient/src/rpcio.c b/cpukit/libfs/src/nfsclient/src/rpcio.c
> index 07bd9a3..286caa7 100644
> --- a/cpukit/libfs/src/nfsclient/src/rpcio.c
> +++ b/cpukit/libfs/src/nfsclient/src/rpcio.c
> @@ -1348,9 +1348,7 @@ rtems_status_code status;
>                                         fprintf(stderr,"RPCIO XACT timed out; waking up requestor\n");
>  #endif
>                                         if ( rtems_event_send(xact->requestor, RTEMS_RPC_EVENT) ) {
> -                                               rtems_panic("RPCIO PANIC file %s line: %i, requestor id was 0x%08x",
> -                                                                       __FILE__,
> -                                                                       __LINE__,
> +                                               rtems_panic("RPCIO PANIC: requestor id was 0x%08x",
>                                                                         xact->requestor);
>                                         }
>
>
> _______________________________________________
> vc mailing list
> vc at rtems.org
> http://lists.rtems.org/mailman/listinfo/vc


More information about the devel mailing list