grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] json: Update jsmn library to get rid of casts


From: Patrick Steinhardt
Subject: Re: [PATCH 2/2] json: Update jsmn library to get rid of casts
Date: Wed, 15 Apr 2020 22:55:51 +0200

On Tue, Apr 14, 2020 at 08:19:01PM +0200, Daniel Kiper wrote:
> On Tue, Apr 07, 2020 at 06:02:29PM +0200, Patrick Steinhardt wrote:
> > @@ -80,7 +80,7 @@ typedef struct {
> >   * JSON parser. Contains an array of token blocks available. Also stores
> >   * the string being parsed now and current position in that string.
> >   */
> > -typedef struct {
> > +typedef struct jsmn_parser {
> 
> Commit message says about jsmntok only. Here you add jsmn_parser too.
> If it is needed then it should go into separate patch.

Note that this is pulled in by the upgrade to the newer jsmn library,
bringing in not only the changes I want to make sure of.

> >    unsigned int pos;     /* offset in the JSON string */
> >    unsigned int toknext; /* next token to allocate */
> >    int toksuper;         /* superior token node, e.g. parent object or 
> > array */
> > @@ -154,6 +154,9 @@ static int jsmn_parse_primitive(jsmn_parser *parser, 
> > const char *js,
> >      case ']':
> >      case '}':
> >        goto found;
> > +    default:
> > +                   /* to quiet a warning from gcc*/
> > +      break;
> 
> It seems to me that this belongs to separate patch.

See above. This is brought in by the update to 053d3cd. I could split
this up into two parts, though. First the update of "jsmn.h", followed
by our own changes in our wrapper. That would probably clear things up?

Patrick

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]