This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 01/12] btrace: add struct btrace_data


Hi Markus,

On 07/14/2014 02:56 PM, Markus Metzger wrote:
> +    default:
> +      gdb_xml_error (parser, _("Btrace format error."));
> +      return;
> +    }

gdb_xml_error throws, so the return is dead.

On 07/14/2014 02:56 PM, Markus Metzger wrote:
> +
> +const char *
> +btrace_format_string (enum btrace_format format)
> +{
> +  switch (format)
> +    {
> +    case BTRACE_FORMAT_NONE: return "No or unknown format";
> +    case BTRACE_FORMAT_BTS: return "Intel(R) Branch Trace Store";

Please put the return statements on their own lines.  Also, I
think at least the first string should go through _() for i18n.

> +    }
> +
> +  internal_error (__FILE__, __LINE__, _("Unknown branch trace format"));
> +}


Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]