From: <ale...@us...> - 2013-11-19 13:19:19
|
Revision: 58810 http://sourceforge.net/p/firebird/code/58810 Author: alexpeshkoff Date: 2013-11-19 13:19:11 +0000 (Tue, 19 Nov 2013) Log Message: ----------- Fixed some gcc warnings Modified Paths: -------------- firebird/trunk/extern/editline/config.h.in firebird/trunk/extern/editline/src/chartype.h firebird/trunk/extern/editline/src/readline.c firebird/trunk/extern/editline/src/vi.c firebird/trunk/src/burp/burp.cpp firebird/trunk/src/common/common.h firebird/trunk/src/common/isc_sync.cpp firebird/trunk/src/common/os/posix/fbsyslog.cpp firebird/trunk/src/common/utils.cpp firebird/trunk/src/dsql/Parser.cpp firebird/trunk/src/gpre/languages/rmc.cpp firebird/trunk/src/isql/ColList.cpp firebird/trunk/src/isql/ColList.h firebird/trunk/src/isql/isql.epp firebird/trunk/src/jrd/DataTypeUtil.cpp firebird/trunk/src/jrd/Optimizer.cpp firebird/trunk/src/jrd/SimilarToMatcher.h firebird/trunk/src/jrd/constants.h firebird/trunk/src/jrd/exe.h firebird/trunk/src/jrd/met.epp firebird/trunk/src/jrd/svc.cpp firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp firebird/trunk/src/lock/lock.cpp firebird/trunk/src/lock/print.cpp firebird/trunk/src/msgs/build_file.epp firebird/trunk/src/qli/command.cpp firebird/trunk/src/qli/exe.cpp firebird/trunk/src/utilities/fbsvcmgr/fbsvcmgr.cpp firebird/trunk/src/utilities/nbackup/nbackup.cpp firebird/trunk/src/yvalve/gds.cpp firebird/trunk/src/yvalve/utl.cpp Modified: firebird/trunk/extern/editline/config.h.in =================================================================== --- firebird/trunk/extern/editline/config.h.in 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/extern/editline/config.h.in 2013-11-19 13:19:11 UTC (rev 58810) @@ -295,3 +295,5 @@ #undef LIBC_SCCS #define lint +#define EL_UNUSED(a) if (a) + Modified: firebird/trunk/extern/editline/src/chartype.h =================================================================== --- firebird/trunk/extern/editline/src/chartype.h 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/extern/editline/src/chartype.h 2013-11-19 13:19:11 UTC (rev 58810) @@ -65,9 +65,9 @@ #endif #define ct_mbtowc mbtowc -#define ct_mbtowc_reset mbtowc(0,0,(size_t)0) +#define ct_mbtowc_reset EL_UNUSED(mbtowc(0,0,(size_t)0)) #define ct_wctomb wctomb -#define ct_wctomb_reset wctomb(0,0) +#define ct_wctomb_reset EL_UNUSED(wctomb(0,0)) #define ct_wcstombs wcstombs #define ct_mbstowcs mbstowcs Modified: firebird/trunk/extern/editline/src/readline.c =================================================================== --- firebird/trunk/extern/editline/src/readline.c 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/extern/editline/src/readline.c 2013-11-19 13:19:11 UTC (rev 58810) @@ -1292,7 +1292,9 @@ } fflush(fp); if((off = ftello(fp)) > 0) - (void)ftruncate(fileno(fp), off); + { + EL_UNUSED(ftruncate(fileno(fp), off)); + } out3: fclose(tp); out2: Modified: firebird/trunk/extern/editline/src/vi.c =================================================================== --- firebird/trunk/extern/editline/src/vi.c 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/extern/editline/src/vi.c 2013-11-19 13:19:11 UTC (rev 58810) @@ -1031,8 +1031,8 @@ ct_wcstombs(cp, line, TMP_BUFSIZ - 1); cp[TMP_BUFSIZ - 1] = '\0'; len = strlen(cp); - write(fd, cp, len); - write(fd, "\n", (size_t)1); + EL_UNUSED(write(fd, cp, len)); + EL_UNUSED(write(fd, "\n", (size_t)1)); pid = fork(); switch (pid) { case -1: Modified: firebird/trunk/src/burp/burp.cpp =================================================================== --- firebird/trunk/src/burp/burp.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/burp/burp.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -2349,7 +2349,7 @@ off_t fileSize = lseek(file, 0, SEEK_CUR); if (fileSize != (off_t)(-1)) { - ftruncate(file, fileSize); + FB_UNUSED(ftruncate(file, fileSize)); } } Modified: firebird/trunk/src/common/common.h =================================================================== --- firebird/trunk/src/common/common.h 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/common/common.h 2013-11-19 13:19:11 UTC (rev 58810) @@ -890,6 +890,8 @@ #define FB_FINAL #endif +#define FB_UNUSED(value) if (value) + // 30 Dec 2002. Nickolay Samofatov // This needs to be checked for all supported platforms // The simpliest way to check it is to issue from correct client: Modified: firebird/trunk/src/common/isc_sync.cpp =================================================================== --- firebird/trunk/src/common/isc_sync.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/common/isc_sync.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -714,7 +714,7 @@ return; } - ftruncate(fdSem, sizeof(*this)); + FB_UNUSED(ftruncate(fdSem, sizeof(*this))); for (int i = 0; i < N_SETS; ++i) { @@ -1929,7 +1929,7 @@ if (mainLock->setlock(statusVector, FileLock::FLM_TRY_EXCLUSIVE)) { if (trunc_flag) - ftruncate(mainLock->getFd(), length); + FB_UNUSED(ftruncate(mainLock->getFd(), length)); if (callback->initialize(this, true)) { @@ -3042,7 +3042,7 @@ } if (flag) - ftruncate(mainLock->getFd(), new_length); + FB_UNUSED(ftruncate(mainLock->getFd(), new_length)); MemoryHeader* const address = (MemoryHeader*) mmap(0, new_length, PROT_READ | PROT_WRITE, MAP_SHARED, mainLock->getFd(), 0); Modified: firebird/trunk/src/common/os/posix/fbsyslog.cpp =================================================================== --- firebird/trunk/src/common/os/posix/fbsyslog.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/common/os/posix/fbsyslog.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -50,8 +50,8 @@ } if (isatty(fd)) { - write(fd, msg, strlen(msg)); - write(fd, "\n", 1); + FB_UNUSED(write(fd, msg, strlen(msg))); + FB_UNUSED(write(fd, "\n", 1)); } } } // namespace Firebird Modified: firebird/trunk/src/common/utils.cpp =================================================================== --- firebird/trunk/src/common/utils.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/common/utils.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -692,9 +692,9 @@ #if defined(WIN_NT) _getcwd(buffer, MAXPATHLEN); #elif defined(HAVE_GETCWD) - getcwd(buffer, MAXPATHLEN); + FB_UNUSED(getcwd(buffer, MAXPATHLEN)); #else - getwd(buffer); + FB_UNUSED(getwd(buffer)); #endif pn.recalculate_length(); } Modified: firebird/trunk/src/dsql/Parser.cpp =================================================================== --- firebird/trunk/src/dsql/Parser.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/dsql/Parser.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -397,7 +397,7 @@ check_bound(p, string); - if (p - string > MAX_SQL_IDENTIFIER_LEN) + if (p > string + MAX_SQL_IDENTIFIER_LEN) yyabandon(-104, isc_dyn_name_longer); *p = 0; Modified: firebird/trunk/src/gpre/languages/rmc.cpp =================================================================== --- firebird/trunk/src/gpre/languages/rmc.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/gpre/languages/rmc.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -1749,7 +1749,7 @@ const TEXT* s = ready->rdy_filename; if (s && ((*s == '\'') || (*s == '\"'))) { - int len = strlen(++s); + unsigned int len = strlen(++s); if (len >= sizeof(fname)) len = sizeof(fname); @@ -3963,7 +3963,7 @@ while (*p) ++p; - fb_assert(p - string1 < sizeof(string1)); + fb_assert(p < string1 + sizeof(string1)); #endif printa(space, false, "%s", string1); Modified: firebird/trunk/src/isql/ColList.cpp =================================================================== --- firebird/trunk/src/isql/ColList.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/isql/ColList.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -27,7 +27,7 @@ #include "../common/utils_proto.h" -ColList::item::item(const char* name, int len) +ColList::item::item(const char* name, unsigned len) : col_len(len), next(0) { fb_utils::copy_terminate(col_name, name, sizeof(col_name)); @@ -50,7 +50,7 @@ } // Put an item in the list. If the name already exists, replace the item's length. -bool ColList::put(const char* name, int len) +bool ColList::put(const char* name, unsigned len) { if (!m_head) { @@ -119,7 +119,7 @@ // Locate the item by name and return true if found; false otherwise. // If found, put the item's length in the second (output) argument. -bool ColList::find(const char* name, int* out_len) const +bool ColList::find(const char* name, unsigned* out_len) const { for (const item* pc = m_head; pc; pc = pc->next) { Modified: firebird/trunk/src/isql/ColList.h =================================================================== --- firebird/trunk/src/isql/ColList.h 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/isql/ColList.h 2013-11-19 13:19:11 UTC (rev 58810) @@ -38,19 +38,19 @@ struct item { TEXT col_name[MAX_SQL_IDENTIFIER_SIZE]; - int col_len; + unsigned col_len; item* next; - item(const char* name, int len); + item(const char* name, unsigned len); }; ColList(); ~ColList(); void clear(); item* getHead(); - bool put(const char* name, int len); + bool put(const char* name, unsigned len); bool remove(const char* name); const item* find(const char* name) const; - bool find(const char* name, int* out_len) const; + bool find(const char* name, unsigned* out_len) const; size_t count() const; private: Modified: firebird/trunk/src/isql/isql.epp =================================================================== --- firebird/trunk/src/isql/isql.epp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/isql/isql.epp 2013-11-19 13:19:11 UTC (rev 58810) @@ -365,18 +365,18 @@ #ifdef DEV_BUILD static processing_state passthrough(const char* cmd); #endif -static SSHORT print_item(TEXT**, XSQLVAR*, const int); +static SSHORT print_item(TEXT**, XSQLVAR*, const unsigned); static void print_item_numeric(SINT64, int, int, TEXT*); -static processing_state print_line(XSQLDA*, const int pad[], TEXT line[]); +static processing_state print_line(XSQLDA*, const unsigned pad[], TEXT line[]); static void print_performance(const perf64* perf_before); static processing_state print_sqlda_input(const bool is_selectable); static void print_sqlda_output(const XSQLDA& sqlda); -static void process_header(const XSQLDA* sqlda, const int pad[], TEXT header[], TEXT header2[]); +static void process_header(const XSQLDA* sqlda, const unsigned pad[], TEXT header[], TEXT header2[]); static void process_plan(); static SLONG process_record_count(const int statement_type); static SSHORT process_request_type(); static SLONG* process_sqlda_buffer(XSQLDA* const sqlda, SSHORT nullind[]); -static SLONG process_sqlda_display(XSQLDA* const sqlda, SLONG buffer[], int pad[]); +static SLONG process_sqlda_display(XSQLDA* const sqlda, SLONG buffer[], unsigned pad[]); static int process_statement(const TEXT*, XSQLDA**); #ifdef WIN_NT static BOOL CALLBACK query_abort(DWORD); @@ -7224,7 +7224,7 @@ } -static SSHORT print_item(TEXT** s, XSQLVAR* var, const int length) +static SSHORT print_item(TEXT** s, XSQLVAR* var, const unsigned length) { /************************************** * @@ -7244,9 +7244,6 @@ SSHORT dtype = var->sqltype & ~1; // may be modified by print_item_blob() const int dscale = var->sqlscale; - // The printlength should have in it the right length - //const int length = printlength; - if (List) { isqlGlob.printf("%-31s ", fb_utils::exact_name(var->aliasname)); } @@ -7401,11 +7398,11 @@ // Don't let numeric/decimal doubles overflow print length // Special handling for 0 -- don't test log for length - int rounded = 0; + unsigned rounded = 0; if (dscale && (!value || - (rounded = static_cast<int>(ceil(fabs(log10(fabs(value)))))) < length - 10)) + (rounded = static_cast<unsigned int>(ceil(fabs(log10(fabs(value)))))) < length - 10)) { - int precision = 0; + unsigned precision = 0; // CVC: Test values are // select -2.488355210669293e+01 from rdb$database; @@ -7429,7 +7426,7 @@ precision = length - rounded - 2; // Take into account old database containing negative scales for double - if (dscale < 0 && precision > -dscale) + if (dscale < 0 && precision > unsigned(-dscale)) { precision = -dscale; } @@ -7473,7 +7470,7 @@ // See if it is character set OCTETS if (var->sqlsubtype == 1) { - const SLONG hex_len = 2 * var->sqllen; + const ULONG hex_len = 2 * var->sqllen; TEXT* buff2 = (TEXT*) ISQL_ALLOC(hex_len + 1); // Convert the string to hex digits for (USHORT i = 0; i < var->sqllen; i++) { @@ -7558,7 +7555,7 @@ // If CHARACTER SET OCTETS, print two hex digits per octet if (var->sqlsubtype == 1) { - const SLONG hex_len = 2 * avary->vary_length; + const ULONG hex_len = 2 * avary->vary_length; char* buff2 = static_cast<char*>(ISQL_ALLOC(hex_len + 1)); char* bp = buff2; @@ -7576,7 +7573,7 @@ else { // Truncate if necessary - sprintf(p, "%-*.*s ", length, static_cast<int>(MIN(length, hex_len)), buff2); + sprintf(p, "%-*.*s ", length, static_cast<unsigned int>(MIN(length, hex_len)), buff2); } ISQL_FREE(buff2); } @@ -7792,7 +7789,7 @@ } -static processing_state print_line(XSQLDA* sqlda, const int pad[], TEXT line[]) +static processing_state print_line(XSQLDA* sqlda, const unsigned pad[], TEXT line[]) { /************************************** * @@ -8013,7 +8010,7 @@ // *************************** // Write into buffers the information that will be printed as page header for // statements that return data. -static void process_header(const XSQLDA* sqlda, const int pad[], TEXT header[], TEXT header2[]) +static void process_header(const XSQLDA* sqlda, const unsigned pad[], TEXT header[], TEXT header2[]) { // Create the column header : Left justify strings @@ -8265,7 +8262,7 @@ // ***************************************** // Calculate individual column widths and return total line width. // Assign previously allocated buffer in pieces to every XSQLVAR. -static SLONG process_sqlda_display(XSQLDA* const sqlda, SLONG buffer[], int pad[]) +static SLONG process_sqlda_display(XSQLDA* const sqlda, SLONG buffer[], unsigned pad[]) { int linelength = 0; SLONG offset = 0; @@ -8681,9 +8678,9 @@ SLONG* buffer = process_sqlda_buffer(sqlda, nullind); // Pad is an array of lengths to be passed to the print_item - int* pad = NULL; + unsigned* pad = NULL; if (sqlda->sqld) { - pad = (int*) ISQL_ALLOC ((SLONG) (sqlda->sqld * sizeof(int))); + pad = (unsigned*) ISQL_ALLOC ((SLONG) (sqlda->sqld * sizeof(int))); } // Calculate display width and add a few for line termination, et al Modified: firebird/trunk/src/jrd/DataTypeUtil.cpp =================================================================== --- firebird/trunk/src/jrd/DataTypeUtil.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/jrd/DataTypeUtil.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -303,13 +303,13 @@ if (result->isText()) { - SLONG len = convertLength(value, result); + ULONG len = convertLength(value, result); if (length->dsc_address) // constant { - SLONG constant = MIN(MAX_COLUMN_SIZE, CVT_get_long(length, 0, ERR_post)); + SLONG constant = CVT_get_long(length, 0, ERR_post); fb_assert(constant >= 0); - len = MIN(len, constant * maxBytesPerChar(result->getCharSet())); + len = MIN(len, MIN(MAX_COLUMN_SIZE, ULONG(constant)) * maxBytesPerChar(result->getCharSet())); } result->dsc_length = fixLength(result, len) + sizeof(USHORT); Modified: firebird/trunk/src/jrd/Optimizer.cpp =================================================================== --- firebird/trunk/src/jrd/Optimizer.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/jrd/Optimizer.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -643,7 +643,7 @@ if (navigationCandidate < 0) return NULL; - fb_assert(navigationCandidate < indexScratches.getCount()); + fb_assert(unsigned(navigationCandidate) < indexScratches.getCount()); IndexScratch* const indexScratch = &indexScratches[navigationCandidate]; // Looks like we can do a navigational walk. Flag that Modified: firebird/trunk/src/jrd/SimilarToMatcher.h =================================================================== --- firebird/trunk/src/jrd/SimilarToMatcher.h 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/jrd/SimilarToMatcher.h 2013-11-19 13:19:11 UTC (rev 58810) @@ -1348,7 +1348,7 @@ MatchState state = msIterating; - SimpleStack<ULONG> repeatStack; + SimpleStack<SLONG> repeatStack; while (true) { @@ -1374,7 +1374,7 @@ case ENCODE_OP_STATE(opRepeatEnd, msIterating): { const Node* repeatNode = scope->i + node->ref; - ULONG* repeatCount = repeatStack.back; + SLONG* repeatCount = repeatStack.back; if (*repeatCount < repeatNode->len2) { @@ -1389,7 +1389,7 @@ case ENCODE_OP_STATE(opRepeatEnd, msReturningFalse): { const Node* repeatNode = scope->i + node->ref; - ULONG* repeatCount = repeatStack.back; + SLONG* repeatCount = repeatStack.back; if (--*repeatCount >= repeatNode->len) state = msIterating; Modified: firebird/trunk/src/jrd/constants.h =================================================================== --- firebird/trunk/src/jrd/constants.h 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/jrd/constants.h 2013-11-19 13:19:11 UTC (rev 58810) @@ -297,19 +297,19 @@ POST_ERASE_TRIGGER = 6 }; -const int TRIGGER_TYPE_SHIFT = 13; -const int TRIGGER_TYPE_MASK = (0x3 << TRIGGER_TYPE_SHIFT); +const unsigned TRIGGER_TYPE_SHIFT = 13; +const unsigned TRIGGER_TYPE_MASK = (0x3 << TRIGGER_TYPE_SHIFT); -const int TRIGGER_TYPE_DML = (0 << TRIGGER_TYPE_SHIFT); -const int TRIGGER_TYPE_DB = (1 << TRIGGER_TYPE_SHIFT); -const int TRIGGER_TYPE_DDL = (2 << TRIGGER_TYPE_SHIFT); +const unsigned TRIGGER_TYPE_DML = (0 << TRIGGER_TYPE_SHIFT); +const unsigned TRIGGER_TYPE_DB = (1 << TRIGGER_TYPE_SHIFT); +const unsigned TRIGGER_TYPE_DDL = (2 << TRIGGER_TYPE_SHIFT); -const int DB_TRIGGER_CONNECT = 0; -const int DB_TRIGGER_DISCONNECT = 1; -const int DB_TRIGGER_TRANS_START = 2; -const int DB_TRIGGER_TRANS_COMMIT = 3; -const int DB_TRIGGER_TRANS_ROLLBACK = 4; -const int DB_TRIGGER_MAX = 5; +const unsigned DB_TRIGGER_CONNECT = 0; +const unsigned DB_TRIGGER_DISCONNECT = 1; +const unsigned DB_TRIGGER_TRANS_START = 2; +const unsigned DB_TRIGGER_TRANS_COMMIT = 3; +const unsigned DB_TRIGGER_TRANS_ROLLBACK = 4; +const unsigned DB_TRIGGER_MAX = 5; static const char* const DDL_TRIGGER_ACTION_NAMES[][2] = { Modified: firebird/trunk/src/jrd/exe.h =================================================================== --- firebird/trunk/src/jrd/exe.h 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/jrd/exe.h 2013-11-19 13:19:11 UTC (rev 58810) @@ -632,7 +632,7 @@ }; // must correspond to the declared size of RDB$EXCEPTIONS.RDB$MESSAGE -const int XCP_MESSAGE_LENGTH = 1023; +const unsigned XCP_MESSAGE_LENGTH = 1023; } // namespace Jrd Modified: firebird/trunk/src/jrd/met.epp =================================================================== --- firebird/trunk/src/jrd/met.epp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/jrd/met.epp 2013-11-19 13:19:11 UTC (rev 58810) @@ -508,7 +508,7 @@ Jrd::Attachment* att = tdbb->getAttachment(); - for (int i = 0; i < DB_TRIGGER_MAX; i++) { + for (unsigned i = 0; i < DB_TRIGGER_MAX; i++) { release_cached_triggers(tdbb, att->att_triggers[i]); } Modified: firebird/trunk/src/jrd/svc.cpp =================================================================== --- firebird/trunk/src/jrd/svc.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/jrd/svc.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -2167,9 +2167,8 @@ svc_started = true; TEXT buffer[100]; setDataMode(true); - while (!feof(file) && !ferror(file)) + while (fgets(buffer, sizeof(buffer), file)) { - fgets(buffer, sizeof(buffer), file); outputData(buffer, strlen(buffer)); } setDataMode(false); Modified: firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp =================================================================== --- firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -501,7 +501,7 @@ { case tagID: fb_assert(len == sizeof(currID)); - read(m_cfg_file, &currID, len); + FB_UNUSED(read(m_cfg_file, &currID, len)); continue; case tagFlags: Modified: firebird/trunk/src/lock/lock.cpp =================================================================== --- firebird/trunk/src/lock/lock.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/lock/lock.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -1614,7 +1614,7 @@ FILE* const fd = fopen(lock_file, "wb"); if (fd) { - fwrite(m_sharedMemory->getHeader(), 1, m_sharedMemory->getHeader()->lhb_used, fd); + FB_UNUSED(fwrite(m_sharedMemory->getHeader(), 1, m_sharedMemory->getHeader()->lhb_used, fd)); fclose(fd); } Modified: firebird/trunk/src/lock/print.cpp =================================================================== --- firebird/trunk/src/lock/print.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/lock/print.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -657,7 +657,7 @@ } LOCK_header = (lhb*)(UCHAR*) buffer; - const size_t bytes_read = read(fd, LOCK_header, file_stat.st_size); + const int bytes_read = read(fd, LOCK_header, file_stat.st_size); close(fd); if (bytes_read != file_stat.st_size) Modified: firebird/trunk/src/msgs/build_file.epp =================================================================== --- firebird/trunk/src/msgs/build_file.epp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/msgs/build_file.epp 2013-11-19 13:19:11 UTC (rev 58810) @@ -449,7 +449,7 @@ // Re-write header record and finish lseek(global_file, LSEEK_OFFSET_CAST 0, 0); - write(global_file, &header, sizeof(header)); + FB_UNUSED(write(global_file, &header, sizeof(header))); close(global_file); global_file = -1; Modified: firebird/trunk/src/qli/command.cpp =================================================================== --- firebird/trunk/src/qli/command.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/qli/command.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -443,7 +443,7 @@ #endif } - system(buffer); + FB_UNUSED(system(buffer)); } Modified: firebird/trunk/src/qli/exe.cpp =================================================================== --- firebird/trunk/src/qli/exe.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/qli/exe.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -337,7 +337,7 @@ { close(pair[1]); close(0); - dup(pair[0]); + FB_UNUSED(dup(pair[0])); close(pair[0]); execvp(argv[0], argv); ERRQ_msg_put(43, filename); // Msg43 Couldn't run %s Modified: firebird/trunk/src/utilities/fbsvcmgr/fbsvcmgr.cpp =================================================================== --- firebird/trunk/src/utilities/fbsvcmgr/fbsvcmgr.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/utilities/fbsvcmgr/fbsvcmgr.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -553,7 +553,7 @@ bool rc = getLine(s, p); if (rc) { - write(binout, s.c_str(), s.length()); + FB_UNUSED(write(binout, s.c_str(), s.length())); } return rc; } Modified: firebird/trunk/src/utilities/nbackup/nbackup.cpp =================================================================== --- firebird/trunk/src/utilities/nbackup/nbackup.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/utilities/nbackup/nbackup.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -1196,7 +1196,7 @@ //Enter name of the backup file of level %d (\".\" - do not restore further):\n printMsg(69, SafeArg() << curLevel); char temp[256]; - scanf("%255s", temp); + FB_UNUSED(scanf("%255s", temp)); bakname = temp; } if (bakname == ".") Modified: firebird/trunk/src/yvalve/gds.cpp =================================================================== --- firebird/trunk/src/yvalve/gds.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/yvalve/gds.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -1082,7 +1082,7 @@ if (file == -1) return; - write(file, text, length); + FB_UNUSED(write(file, text, length)); close(file); #endif } Modified: firebird/trunk/src/yvalve/utl.cpp =================================================================== --- firebird/trunk/src/yvalve/utl.cpp 2013-11-19 12:36:53 UTC (rev 58809) +++ firebird/trunk/src/yvalve/utl.cpp 2013-11-19 13:19:11 UTC (rev 58810) @@ -516,7 +516,7 @@ TEXT buffer[MAXPATHLEN * 2 + 5]; fb_utils::snprintf(buffer, sizeof(buffer), "%s \"%s\"", editor.c_str(), file_name); - system(buffer); + FB_UNUSED(system(buffer)); struct stat after; stat(file_name, &after); @@ -1778,7 +1778,7 @@ } while (--l); */ if (l) - fwrite(buffer, 1, l, file); + FB_UNUSED(fwrite(buffer, 1, l, file)); } // Close the blob This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |