Skip to contentSkip to conversation

mxssb: trivial fixes

PATCH New Marc Kleine-Budde 2 participants 4 messages Nov 18, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover mxssb: trivial fixes

Hey,

this is a trivial patch series for the mxssb tool. Please review and apply.

regards,
Marc

#1 lore raw

PATCH 1/2 mxssb: Makefile: build with optimisation (-O2) by default

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index a8dbea3a861b..af3deb920785 100644
@@ -1,4 +1,4 @@
-CFLAGS=`pkg-config --cflags libcrypto` -Wall -Wextra
+CFLAGS=`pkg-config --cflags libcrypto` -Wall -Wextra -O2
 LDFLAGS=`pkg-config --libs libcrypto`
 
 mxssb:	mxssb.c
Signature · 1 line
2.1.3
#2 lore raw

PATCH 2/2 mxssb: fix uninitialized variables warnings

In reply to Marc Kleine-Budde

These warning are generated by: gcc version 4.9.1 (Debian 4.9.1-19)

mxssb.c: In function ?main?:
mxssb.c:1580:10: warning: ?ilen? may be used uninitialized in this function [-Wmaybe-uninitialized]

    ret = sb_build_dcd_block(ictx, cmd, SB_DCD_CHK_EQ | ilen);
          ^
mxssb.c:1553:12: note: ?ilen? was declared here
   uint32_t ilen;
            ^
mxssb.c:1556:28: warning: ?rptr? may be used uninitialized in this function [-Wmaybe-uninitialized]
   if (!tok || (strlen(tok) == 0) || (lptr && strlen(lptr) != 1)) {
                            ^
mxssb.c:1495:8: note: ?rptr? was declared here
  char *rptr;
        ^
---
 mxssb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mxssb.c +2 -2
index 14826e7bf84c..3a4c32cf47c9 100644
@@ -1492,7 +1492,7 @@ static int sb_parse_line(struct sb_image_ctx *ictx, struct sb_cmd_list *cmd)
 {
 	char *tok;
 	char *line = cmd->cmd;
-	char *rptr;
+	char *rptr = NULL;
 	int ret;
 
 	/* Analyze the identifier on this line first. */
@@ -1550,7 +1550,7 @@ static int sb_parse_line(struct sb_image_ctx *ictx, struct sb_cmd_list *cmd)
 		}
 	} else if (ictx->in_dcd) {
 		char *lptr;
-		uint32_t ilen;
+		uint32_t ilen = 0;
 
 		tok = strtok_r(tok, ".", &lptr);
 		if (!tok || (strlen(tok) == 0) || (lptr && strlen(lptr) != 1)) {
Signature · 1 line
2.1.3
#3 lore raw

cover mxssb: trivial fixes

In reply to Marc Kleine-Budde
Quoted 1 line · Marc Kleine-Budde

Hey,

Hi!

Quoted 1 line

this is a trivial patch series for the mxssb tool. Please review and apply.

The mxssb tool is dead, the U-Boot has support for generating the MXS images directly (see tools/mxsimage.[ch]). Can you please verify if your patches still apply to that file (they should) ? Would it be possible for you to prepare a patch for the mxsimage tool instead please ?

Thank you for your help!

Best regards,
Marek Vasut