2 --- firebird/src/gpre/c_cxx.cpp
3 +++ firebird/src/gpre/c_cxx.cpp
5 if (based_on->bas_flags & BAS_segment)
8 - fprintf(gpreGlob.out_file, "[%"SLONGFORMAT"]", length);
9 + fprintf(gpreGlob.out_file, "[%" SLONGFORMAT "]", length);
11 else if (field->fld_array_info)
14 for (const dim* dimension = field->fld_array_info->ary_dimension;
15 dimension; dimension = dimension->dim_next)
17 - fprintf(gpreGlob.out_file, " [%"SLONGFORMAT"]", dimension->dim_upper - dimension->dim_lower + 1);
18 + fprintf(gpreGlob.out_file, " [%" SLONGFORMAT "]", dimension->dim_upper - dimension->dim_lower + 1);
21 if (field->fld_array_info->ary_dtype <= dtype_varying && field->fld_length > 1)
23 const gpre_dbb* db = (gpre_dbb*) action->act_object;
26 - fprintf(gpreGlob.out_file, "isc_drop_database (%s, %"SIZEFORMAT", \"%s\", rdb$k_db_type_gds);",
27 + fprintf(gpreGlob.out_file, "isc_drop_database (%s, %" SIZEFORMAT ", \"%s\", rdb$k_db_type_gds);",
28 status_vector(action),
29 strlen(db->dbb_filename), db->dbb_filename);
30 set_sqlcode(action, column);
33 static void gen_type( const act* action, int column)
35 - printa(column, "%"SLONGFORMAT, (SLONG)(IPTR)action->act_object);
36 + printa(column, "%" SLONGFORMAT, (SLONG)(IPTR)action->act_object);
41 for (const dim* dimension = field->fld_array_info->ary_dimension; dimension;
42 dimension = dimension->dim_next)
44 - fprintf(gpreGlob.out_file, " [%"SLONGFORMAT"]", dimension->dim_upper - dimension->dim_lower + 1);
45 + fprintf(gpreGlob.out_file, " [%" SLONGFORMAT "]", dimension->dim_upper - dimension->dim_lower + 1);
48 if (field->fld_array_info->ary_dtype <= dtype_varying)
49 --- firebird/src/gpre/exp.cpp
50 +++ firebird/src/gpre/exp.cpp
52 if (gpreGlob.token_global.tok_type != tok_number)
53 CPR_s_error("<number>");
55 - const char format[8] = "%"SQUADFORMAT;
56 + const char format[8] = "%" SQUADFORMAT;
58 sscanf(gpreGlob.token_global.tok_string, format, &n);
62 const SLONG n = atoi(gpreGlob.token_global.tok_string);
64 - sprintf(buffer, "%"SLONGFORMAT, n);
65 + sprintf(buffer, "%" SLONGFORMAT, n);
66 if (strcmp(buffer, gpreGlob.token_global.tok_string) != 0)
67 PAR_error("Numeric value out of range");
71 const ULONG n = atoi(gpreGlob.token_global.tok_string);
73 - sprintf(buffer, "%"ULONGFORMAT, n);
74 + sprintf(buffer, "%" ULONGFORMAT, n);
75 if (strcmp(buffer, gpreGlob.token_global.tok_string) != 0)
76 PAR_error("Numeric value out of range");
78 --- firebird/src/gpre/gpre.cpp
79 +++ firebird/src/gpre/gpre.cpp
84 - fprintf(gpreGlob.out_file, "#line %"SLONGFORMAT" \"%s\"\n", line, backlash_fixed_file_name);
85 + fprintf(gpreGlob.out_file, "#line %" SLONGFORMAT " \"%s\"\n", line, backlash_fixed_file_name);
87 - fprintf(gpreGlob.out_file, "\n#line %"SLONGFORMAT" \"%s\"", line, backlash_fixed_file_name);
88 + fprintf(gpreGlob.out_file, "\n#line %" SLONGFORMAT " \"%s\"", line, backlash_fixed_file_name);
94 if (c == '\n' && line_pending)
96 - fprintf(gpreGlob.out_file, "\n#line %"SLONGFORMAT" \"%s\"", line + 1, backlash_fixed_file_name);
97 + fprintf(gpreGlob.out_file, "\n#line %" SLONGFORMAT " \"%s\"", line + 1, backlash_fixed_file_name);
101 --- firebird/src/gpre/int_cxx.cpp
102 +++ firebird/src/gpre/int_cxx.cpp
104 fprintf(gpreGlob.out_file, "if (!%s)", request->req_handle);
106 fprintf(gpreGlob.out_file,
107 - "%s = CMP_compile2 (tdbb, (UCHAR*) jrd_%"ULONGFORMAT", sizeof(jrd_%"ULONGFORMAT"), true);",
108 + "%s = CMP_compile2 (tdbb, (UCHAR*) jrd_%" ULONGFORMAT ", sizeof(jrd_%" ULONGFORMAT "), true);",
109 request->req_handle, request->req_ident, request->req_ident);
115 fprintf(gpreGlob.out_file,
116 - "EXE_receive (tdbb, %s, %d, %d, (UCHAR*) &jrd_%"ULONGFORMAT");",
117 + "EXE_receive (tdbb, %s, %d, %d, (UCHAR*) &jrd_%" ULONGFORMAT ");",
118 request->req_handle, port->por_msg_number, port->por_length,
122 if (!(request->req_flags & REQ_exp_hand))
123 fprintf(gpreGlob.out_file, "static void\t*%s;\t// request handle \n", request->req_handle);
125 - fprintf(gpreGlob.out_file, "static const UCHAR\tjrd_%"ULONGFORMAT" [%d] =",
126 + fprintf(gpreGlob.out_file, "static const UCHAR\tjrd_%" ULONGFORMAT " [%d] =",
127 request->req_ident, request->req_length);
129 fprintf(gpreGlob.out_file, "{\t// blr string \n");
134 - fprintf(gpreGlob.out_file, "EXE_send (tdbb, %s, %d, %d, (UCHAR*) &jrd_%"ULONGFORMAT");",
135 + fprintf(gpreGlob.out_file, "EXE_send (tdbb, %s, %d, %d, (UCHAR*) &jrd_%" ULONGFORMAT ");",
136 request->req_handle, port->por_msg_number, port->por_length, port->por_ident);
140 fprintf(gpreGlob.out_file, fmtstr, reference->ref_ident, name);
143 - fprintf(gpreGlob.out_file, "} jrd_%"ULONGFORMAT";", port->por_ident);
144 + fprintf(gpreGlob.out_file, "} jrd_%" ULONGFORMAT ";", port->por_ident);
148 --- firebird/src/gpre/pat.cpp
149 +++ firebird/src/gpre/pat.cpp
153 else if (long_flag) {
154 - sprintf(p, "%"SLONGFORMAT, long_value);
155 + sprintf(p, "%" SLONGFORMAT , long_value);
158 sprintf(p, "%d", value);
159 --- firebird/src/common/classes/alloc.cpp
160 +++ firebird/src/common/classes/alloc.cpp
161 @@ -1100,7 +1100,7 @@
162 if (blk->mbk_flags & MBK_LAST)
165 - fprintf(file, "Blocks %"SIZEFORMAT" min %"SIZEFORMAT" max %"SIZEFORMAT" size %"SIZEFORMAT" \n\n",
166 + fprintf(file, "Blocks %" SIZEFORMAT " min %" SIZEFORMAT " max %" SIZEFORMAT " size %" SIZEFORMAT " \n\n",
170 @@ -1303,7 +1303,7 @@
171 FreeMemoryBlock* freeBlock = blockToPtr<FreeMemoryBlock*>(blk);
172 freeBlock->fbk_next_fragment = NULL;
174 - BlockInfo temp = {blockLength, freeBlock};
175 + BlockInfo temp = {static_cast<size_t>(blockLength), freeBlock};
176 pool->freeBlocks.add(temp);
177 if (!pool->parent_redirect)
179 --- firebird/src/common/cvt.cpp
180 +++ firebird/src/common/cvt.cpp
184 #ifndef WORDS_BIGENDIAN
185 -static const SQUAD quad_min_int = { 0, SLONG_MIN };
186 +static const SQUAD quad_min_int = { 0, static_cast<ULONG>(SLONG_MIN) };
187 static const SQUAD quad_max_int = { -1, SLONG_MAX };
189 static const SQUAD quad_min_int = { SLONG_MIN, 0 };
190 --- firebird/src/jrd/perf.cpp
191 +++ firebird/src/jrd/perf.cpp
192 @@ -164,20 +164,20 @@
196 - sprintf(p, "%"SQUADFORMAT, delta);
197 + sprintf(p, "%" SQUADFORMAT , delta);
204 - sprintf(p, "%"SQUADFORMAT".%.2"SQUADFORMAT, delta / TICK, (delta % TICK) * 100 / TICK);
205 + sprintf(p, "%" SQUADFORMAT ".%.2" SQUADFORMAT , delta / TICK, (delta % TICK) * 100 / TICK);
211 - sprintf(p, "%"SQUADFORMAT".%.2"SQUADFORMAT, delta / 100, delta % 100);
212 + sprintf(p, "%" SQUADFORMAT ".%.2" SQUADFORMAT , delta / 100, delta % 100);