Page MenuHome GnuPG

gnupg-2.2.18/scd/ccid-driver.c:3702: possible missing break ?
Closed, ResolvedPublic

Description

gnupg-2.2.18/scd/ccid-driver.c:3702:41: warning: Variable 'p' is reassigned a value before the old one has been used. 'break;' missing? [redundantAssignInSwitch]

Source code is

switch (err)
  {
  case 0: p = "success";
  case CCID_DRIVER_ERR_OUT_OF_CORE: p = "out of core"; break;

Maybe better code:

switch (err)
  {
  case 0: p = "success"; break;
  case CCID_DRIVER_ERR_OUT_OF_CORE: p = "out of core"; break;

Event Timeline

werner added a project: scd.
werner added a subscriber: werner.

Thanks.

[ Please do not post each compiler warning as a single report. That is just just too much overhead and we do see such messages ourselves if you would provide a bit more information. ]

werner claimed this task.

This is actually unused code and it will never be called with ERR == 0. Will fix it in master anway.