[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Script for warning about error leaks

From: Peter Samuelson <peter_at_p12n.org>
Date: 2006-02-06 23:10:22 CET

[Julian Foad]
> +#!/bin/sh

> +ATTRIB_RE="__attribute__((warn_unused_result))"
> +ATTRIB_STR="${ATTRIB_RE//\\}" # plain text version of it: remove any backslashes

${foo//bar} is a bashism.

   ATTRIB_STR=$(echo "$ATTRIB_RE" | tr -d '\\')

> +for F in "$@"; do

I'm fairly sure it's portable to drop the in "$@" part:

   for F; do

...though not everyone seems to realise this, so perhaps your version
is clearer in general.

> + else
> + echo "$0: skipping \"$F\": is not a regular file"

Looks a little funny to me; utilities would traditionally just say

       echo "$0: skipping \"$F\": not a regular file"

Received on Mon Feb 6 23:37:49 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.