View Issue Details

IDProjectCategoryView StatusLast Update
0005316UBootU-Bootpublic2022-04-14 14:46
Reportergerbach Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Versionfsimx6ul-B2022.04 
Target Versionfsimx6ul-B2022.04Fixed in Versionfsimx6ul-B2022.04 
Summary0005316: lib: errno: avoid error format-overflow
DescriptionIn cmd/regulator.c an error occurs with GCC 9.2.1 if CONFIG_ERRNO_STR is
not defined:

cmd/regulator.c: In function ‘failure’:
cmd/regulator.c:20:2: error: ‘%s’ directive argument is null
   20 | printf("Error: %d (%s)\n", ret, errno_str(ret));
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘constraint’,
    inlined from ‘constraint’ at cmd/regulator.c:111:12:
cmd/regulator.c:115:3: error: ‘%s’ directive argument is null
  115 | printf(" %s (err: %d)\n", errno_str(val), val);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

errno_str() should return a valid string instead of NULL if
CONFIG_ERRNO_STR is not defined.
Forum Link



2022-04-14 14:46

developer   ~0004083

Git commit: fbd036a77a21e14e0825a9ea0fafed45016551cb