Kouhei Sutou
null+****@clear*****
Thu Oct 30 19:58:51 JST 2014
Kouhei Sutou 2014-10-30 19:58:51 +0900 (Thu, 30 Oct 2014) New Revision: cf425061c8ad02c858ffd6f320c68062043e6b13 https://github.com/groonga/groonga/commit/cf425061c8ad02c858ffd6f320c68062043e6b13 Message: Use "%lu" for DWORD Modified files: src/groonga_benchmark.c Modified: src/groonga_benchmark.c (+8 -7) =================================================================== --- src/groonga_benchmark.c 2014-10-30 19:52:46 +0900 (ec87246) +++ src/groonga_benchmark.c 2014-10-30 19:58:51 +0900 (d9a879e) @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ /* - Copyright(C) 2010-2012 Brazil + Copyright(C) 2010-2014 Brazil This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -598,7 +598,7 @@ command_send_http(grn_ctx *ctx, const char *command, int type, int task_id) fprintf(stderr, "failed to connect to groonga at %s:%d via HTTP: ", grntest_serverhost, grntest_serverport); #ifdef WIN32 - fprintf(stderr, "%d\n", GetLastError()); + fprintf(stderr, "%lu\n", GetLastError()); #else fprintf(stderr, "%s\n", strerror(errno)); #endif @@ -1313,9 +1313,9 @@ get_sysinfo(const char *path, char *result, int olen) GetSystemInfo(&sinfo); if (grntest_outtype == OUT_TSV) { - sprintf(tmpbuf, "CORE\t%d\n", sinfo.dwNumberOfProcessors); + sprintf(tmpbuf, "CORE\t%lu\n", sinfo.dwNumberOfProcessors); } else { - sprintf(tmpbuf, " \"CORE\": %d,\n", sinfo.dwNumberOfProcessors); + sprintf(tmpbuf, " \"CORE\": %lu,\n", sinfo.dwNumberOfProcessors); } strcat(result, tmpbuf); @@ -1338,9 +1338,10 @@ get_sysinfo(const char *path, char *result, int olen) osinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&osinfo); if (grntest_outtype == OUT_TSV) { - sprintf(tmpbuf, "Windows %d.%d\n", osinfo.dwMajorVersion, osinfo.dwMinorVersion); + sprintf(tmpbuf, "Windows %ld.%ld\n", + osinfo.dwMajorVersion, osinfo.dwMinorVersion); } else { - sprintf(tmpbuf, " \"OS\": \"Windows %d.%d\",\n", osinfo.dwMajorVersion, + sprintf(tmpbuf, " \"OS\": \"Windows %lu.%lu\",\n", osinfo.dwMajorVersion, osinfo.dwMinorVersion); } strcat(result, tmpbuf); @@ -1561,7 +1562,7 @@ start_server(const char *dbpath, int r) 0, NULL, NULL, &si, &grntest_pi); if (ret == 0) { - fprintf(stderr, "Cannot start groonga server: <%s>: error=%d\n", + fprintf(stderr, "Cannot start groonga server: <%s>: error=%lu\n", groonga_path, GetLastError()); exit(1); } -------------- next part -------------- HTML����������������������������...Descargar