• R/O
  • SSH
  • HTTPS

yash: Commit


Commit MetaInfo

Revision4003 (tree)
Time2019-09-21 22:59:17
Authormagicant

Log Message

Suppress compile-time warning from clang 8

Change Summary

Incremental Difference

--- yash/trunk/variable.c (revision 4002)
+++ yash/trunk/variable.c (revision 4003)
@@ -463,7 +463,7 @@
463463 /* POSIX forbids resetting LC_CTYPE even if the value of the variable
464464 * is changed, but we do reset LC_CTYPE if the shell is interactive and
465465 * not in the POSIXly-correct mode. */
466- if (wcscmp(name + 3, L VAR_LC_ALL + 3) == 0) {
466+ if (wcscmp(&name[3], &(L VAR_LC_ALL)[3]) == 0) {
467467 reset_locale_all:
468468 reset_locale_category(L VAR_LC_COLLATE, LC_COLLATE);
469469 if (!posixly_correct && is_interactive_now)
@@ -472,18 +472,18 @@
472472 reset_locale_category(L VAR_LC_MONETARY, LC_MONETARY);
473473 reset_locale_category(L VAR_LC_NUMERIC, LC_NUMERIC);
474474 reset_locale_category(L VAR_LC_TIME, LC_TIME);
475- } else if (wcscmp(name + 3, L VAR_LC_COLLATE + 3) == 0) {
475+ } else if (wcscmp(&name[3], &(L VAR_LC_COLLATE)[3]) == 0) {
476476 reset_locale_category(L VAR_LC_COLLATE, LC_COLLATE);
477- } else if (wcscmp(name + 3, L VAR_LC_CTYPE + 3) == 0) {
477+ } else if (wcscmp(&name[3], &(L VAR_LC_CTYPE)[3]) == 0) {
478478 if (!posixly_correct && is_interactive_now)
479479 reset_locale_category(L VAR_LC_CTYPE, LC_CTYPE);
480- } else if (wcscmp(name + 3, L VAR_LC_MESSAGES + 3) == 0) {
480+ } else if (wcscmp(&name[3], &(L VAR_LC_MESSAGES)[3]) == 0) {
481481 reset_locale_category(L VAR_LC_MESSAGES, LC_MESSAGES);
482- } else if (wcscmp(name + 3, L VAR_LC_MONETARY + 3) == 0) {
482+ } else if (wcscmp(&name[3], &(L VAR_LC_MONETARY)[3]) == 0) {
483483 reset_locale_category(L VAR_LC_MONETARY, LC_MONETARY);
484- } else if (wcscmp(name + 3, L VAR_LC_NUMERIC + 3) == 0) {
484+ } else if (wcscmp(&name[3], &(L VAR_LC_NUMERIC)[3]) == 0) {
485485 reset_locale_category(L VAR_LC_NUMERIC, LC_NUMERIC);
486- } else if (wcscmp(name + 3, L VAR_LC_TIME + 3) == 0) {
486+ } else if (wcscmp(&name[3], &(L VAR_LC_TIME)[3]) == 0) {
487487 reset_locale_category(L VAR_LC_TIME, LC_TIME);
488488 }
489489 }
Show on old repository browser