view gcc/testsuite/c-c++-common/substring-location-PR-87721.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

# define DBG_ERROR(dbg_logger, format, args...) if (1){\
  char dbg_buffer[256]; \
  __builtin_snprintf(dbg_buffer, sizeof(dbg_buffer)-1,\
  __FILE__":%5d: " format  , __LINE__ , ## args); \
};

void testPasswordStore1(int argc, char **argv) {
  const char *pw1="Secret1";
  char pw[256];
  DBG_ERROR(0, "Bad password, expected [%s], got [%s].", pw1, pw);
}