New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 772532 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

mosys logging should have printf() format checking

Project Member Reported by sjg@chromium.org, Oct 6 2017

Issue description

If you update mosys include/mosys/log.h to have 

/* log something */
extern int lprintf(enum log_levels level, const char *format, ...)
		__attribute__ ((format (__printf__, 2, 3)));
/* log something including the errno string */
extern int lperror(enum log_levels level, const char *format, ...)
		__attribute__ ((format (__printf__, 2, 3)));


then lots of warnings / errors are emitted.

We should do that and fix the warnings.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/mosys/+/13f126ac0268ca531fecf3446cab1e248453cfc3

commit 13f126ac0268ca531fecf3446cab1e248453cfc3
Author: Chris Ching <chingcodes@chromium.org>
Date: Sat Oct 14 10:18:31 2017

fix incorrect lprintf calls

BRANCH=none
BUG= chromium:772532 
TEST=FEATURES=test emerge-kahlee mosys

Change-Id: Iec7d15a1062f7631baa3c7283bcb547de29cdc50
Signed-off-by: Chris Ching <chingcodes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/719393
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/core/command/eeprom.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/core/platform.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/include/mosys/log.h
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/lib/smbios/smbios.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/intf/mmio.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/platform/stumpy/eeprom.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/platform/parrot/eeprom.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/platform/stout/eeprom.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/lib/file/file.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/lib/eventlog/elog.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/platform/mario/eeprom.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/lib/vpd/binary_blob.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/lib/cbfs/cbfs_core.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/lib/vpd/vpd.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/platform/zgb/eeprom.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/lib/misc/probe.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/lib/flashrom/flashrom.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/platform/kiev/eeprom.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/core/command/sensor.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/lib/vbnv/vbnv_flash.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/platform/lumpy/eeprom.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/platform/alex/eeprom.c
[modify] https://crrev.com/13f126ac0268ca531fecf3446cab1e248453cfc3/platform/butterfly/eeprom.c

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 15 2017

Status: Fixed (was: Untriaged)

Comment 4 by sjg@google.com, Oct 16 2017

Cc: adurbin@chromium.org

Sign in to add a comment