* [pm:bleeding-edge 57/72] drivers/acpi/acpica/dbinput.c:514:7: warning: multi-character character constant
@ 2019-10-25 14:32 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-10-25 14:32 UTC (permalink / raw)
To: Erik Schmauss
Cc: kbuild-all, linux-acpi, devel, linux-pm, Rafael J. Wysocki, Bob Moore
[-- Attachment #1: Type: text/plain, Size: 4716 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head: 1cf26ab470eb62bb4f239eb0d9410f8c174bed6b
commit: 72ad7b25e6357468b3f5306f2c716313a7664d39 [57/72] ACPICA: debugger: add field unit support for acpi_db_get_next_token
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 72ad7b25e6357468b3f5306f2c716313a7664d39
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/acpi/acpica/dbinput.c: In function 'acpi_db_get_next_token':
>> drivers/acpi/acpica/dbinput.c:514:7: warning: multi-character character constant [-Wmultichar]
case ' {':
^~~~
>> drivers/acpi/acpica/dbinput.c:514:2: warning: case label value exceeds maximum value for type
case ' {':
^~~~
vim +514 drivers/acpi/acpica/dbinput.c
444
445 /*******************************************************************************
446 *
447 * FUNCTION: acpi_db_get_next_token
448 *
449 * PARAMETERS: string - Command buffer
450 * next - Return value, end of next token
451 *
452 * RETURN: Pointer to the start of the next token.
453 *
454 * DESCRIPTION: Command line parsing. Get the next token on the command line
455 *
456 ******************************************************************************/
457
458 char *acpi_db_get_next_token(char *string,
459 char **next, acpi_object_type *return_type)
460 {
461 char *start;
462 u32 depth;
463 acpi_object_type type = ACPI_TYPE_INTEGER;
464
465 /* At end of buffer? */
466
467 if (!string || !(*string)) {
468 return (NULL);
469 }
470
471 /* Remove any spaces at the beginning */
472
473 if (*string == ' ') {
474 while (*string && (*string == ' ')) {
475 string++;
476 }
477
478 if (!(*string)) {
479 return (NULL);
480 }
481 }
482
483 switch (*string) {
484 case '"':
485
486 /* This is a quoted string, scan until closing quote */
487
488 string++;
489 start = string;
490 type = ACPI_TYPE_STRING;
491
492 /* Find end of string */
493
494 while (*string && (*string != '"')) {
495 string++;
496 }
497 break;
498
499 case '(':
500
501 /* This is the start of a buffer, scan until closing paren */
502
503 string++;
504 start = string;
505 type = ACPI_TYPE_BUFFER;
506
507 /* Find end of buffer */
508
509 while (*string && (*string != ')')) {
510 string++;
511 }
512 break;
513
> 514 case ' {':
515
516 /* This is the start of a field unit, scan until closing brace */
517
518 string++;
519 start = string;
520 type = ACPI_TYPE_FIELD_UNIT;
521
522 /* Find end of buffer */
523
524 while (*string && (*string != '}')) {
525 string++;
526 }
527 break;
528
529 case '[':
530
531 /* This is the start of a package, scan until closing bracket */
532
533 string++;
534 depth = 1;
535 start = string;
536 type = ACPI_TYPE_PACKAGE;
537
538 /* Find end of package (closing bracket) */
539
540 while (*string) {
541
542 /* Handle String package elements */
543
544 if (*string == '"') {
545 /* Find end of string */
546
547 string++;
548 while (*string && (*string != '"')) {
549 string++;
550 }
551 if (!(*string)) {
552 break;
553 }
554 } else if (*string == '[') {
555 depth++; /* A nested package declaration */
556 } else if (*string == ']') {
557 depth--;
558 if (depth == 0) { /* Found final package closing bracket */
559 break;
560 }
561 }
562
563 string++;
564 }
565 break;
566
567 default:
568
569 start = string;
570
571 /* Find end of token */
572
573 while (*string && (*string != ' ')) {
574 string++;
575 }
576 break;
577 }
578
579 if (!(*string)) {
580 *next = NULL;
581 } else {
582 *string = 0;
583 *next = string + 1;
584 }
585
586 *return_type = type;
587 return (start);
588 }
589
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 70177 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-25 14:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25 14:32 [pm:bleeding-edge 57/72] drivers/acpi/acpica/dbinput.c:514:7: warning: multi-character character constant kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).