+ The following commit fixes error build for aarch.
+ C++ source code was formatted in whole project.
+ Added -Wformat-signedness flag to check the signedness of arguments
passed to the logging macros.
[Verification] Code compiles for 32&64 bit archs
Change-Id: I106afb31132babb50c3a4b64dd510d627c5c10fe
Signed-off-by: Szymon Jastrzebski <s.jastrzebsk@partner.samsung.com>
}
std::string delay_str = std::to_string(delay);
- int ret_app = app_control_add_extra_data(app_control, kAlarmRelativeDelayKey, delay_str.c_str());
+ int ret_app =
+ app_control_add_extra_data(app_control, kAlarmRelativeDelayKey, delay_str.c_str());
if (APP_CONTROL_ERROR_NONE != ret_app) {
LogAndReportError(
PlatformResult(ErrorCode::UNKNOWN_ERR, "Fail to add data from app_control."), &out,
int ret_app = app_control_get_extra_data(app_control, kAlarmRelativeDelayKey, &delay_string);
if (APP_CONTROL_ERROR_NONE != ret_app) {
- return LogAndCreateResult(ErrorCode::NOT_FOUND_ERR, "Failed to get data.",
- ("Failed to get data: %d (%s)", ret_app, get_error_message(ret_app)));
+ return LogAndCreateResult(
+ ErrorCode::NOT_FOUND_ERR, "Failed to get data.",
+ ("Failed to get data: %d (%s)", ret_app, get_error_message(ret_app)));
}
obj.insert(std::make_pair("type", picojson::value(kAlarmRelative)));
ScopeLogger();
if (m_entry_map) {
- LoggerD("Unlinking old m_entry_map: %d ArchiveFileEntries", m_entry_map->size());
+ LoggerD("Unlinking old m_entry_map: %zu ArchiveFileEntries", m_entry_map->size());
for (auto it = m_entry_map->begin(); it != m_entry_map->end(); ++it) {
if (it->second) {
it->second->setArchiveFileNonProtectPtr(NULL);
ScopeLogger();
if (m_entry_map) {
- LoggerD("Unlinking old m_entry_map: %d ArchiveFileEntries", m_entry_map->size());
+ LoggerD("Unlinking old m_entry_map: %zu ArchiveFileEntries", m_entry_map->size());
for (auto it = m_entry_map->begin(); it != m_entry_map->end(); ++it) {
if (it->second) {
it->second->setArchiveFileNonProtectPtr(NULL);
m_entry_map = entries;
- LoggerD("Linking new m_entry_map ArchiveFileEntries (%d) with ArchiveFile object",
+ LoggerD("Linking new m_entry_map ArchiveFileEntries (%zu) with ArchiveFile object",
m_entry_map->size());
for (auto it = m_entry_map->begin(); it != m_entry_map->end(); ++it) {
if (it->second) {
}
file_ptr = FilePtr(new File(node, File::PermissionList()));
- LoggerD("open: %s mode: 0x%x overwrite: %d", location_full_path.c_str(), fm, overwrite);
+ LoggerD("open: %s mode: 0x%d overwrite: %d", location_full_path.c_str(), fm, overwrite);
if (FileMode::WRITE == fm || FileMode::READ_WRITE == fm) {
if (overwrite) {
LoggerD("Deleting existing file: %s", location_full_path.c_str());
}
type = S_ISDIR(syminfo.st_mode) ? NT_DIRECTORY : NT_FILE;
- LoggerD("%x", type);
+ LoggerD("%d", type);
}
*node = std::shared_ptr<Node>(new Node(path, type));
UnZip::~UnZip() {
ScopeLogger();
for (auto& x : path_access_map) {
- LoggerD("Setting permission for path: %s [%d] ", x.first.c_str(), x.second);
+ LoggerD("Setting permission for path: %s [%u] ", x.first.c_str(), x.second);
if (chmod(x.first.c_str(), x.second) == -1) {
LoggerE("Couldn't set permissions for: [%s] errno: %s", x.first.c_str(),
GetErrorString(errno).c_str());
}
}
- LoggerD("Set dir: [%s] access and modify to: %4d-%2d-%2d %2d:%2d:%2d", m_new_dir_path.c_str(),
+ LoggerD("Set dir: [%s] access and modify to: %4u-%2u-%2u %2u:%2u:%2u", m_new_dir_path.c_str(),
m_file_info.tmu_date.tm_year, m_file_info.tmu_date.tm_mon, m_file_info.tmu_date.tm_mday,
m_file_info.tmu_date.tm_hour, m_file_info.tmu_date.tm_min, m_file_info.tmu_date.tm_sec);
fseek(m_input_file, 0, SEEK_END);
const size_t in_file_size = ftell(m_input_file);
fseek(m_input_file, 0, SEEK_SET);
- LoggerD("Source file: [%s] size: %d - %s", src_file_path.c_str(), in_file_size,
+ LoggerD("Source file: [%s] size: %zu - %s", src_file_path.c_str(), in_file_size,
bytesToReadableString(in_file_size).c_str());
cur_afentry->setSize(in_file_size);
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "New file addition failed");
}
- LoggerD("Read: %d bytes from input file:[%s]", size_read, src_file_path.c_str());
+ LoggerD("Read: %zu bytes from input file:[%s]", size_read, src_file_path.c_str());
total_bytes_read += size_read;
m_bytes_compressed += size_read;
LoggerD(
"Callculatting overall progress: %llu/%llu bytes; "
- "%lu/%lu files; current file: [%s] progress: %d/%d bytes; ",
+ "%lu/%lu files; current file: [%s] progress: %zu/%zu bytes; ",
m_bytes_compressed, m_bytes_to_compress, m_files_compressed, m_files_to_compress,
src_file_path.c_str(), total_bytes_read, in_file_size);
if (in_file_size != total_bytes_read) {
return LogAndCreateResult(
ErrorCode::UNKNOWN_ERR, "Could not add file to archive",
- ("in_file_size(%d) != total_bytes_read(%d)", in_file_size, total_bytes_read));
+ ("in_file_size(%zu) != total_bytes_read(%zu)", in_file_size, total_bytes_read));
}
fclose(m_input_file);
}
ret = badge_set_count(app_id_str, count);
- LoggerD("badge_set_count() ret : %d, %s, count : %d ", ret, get_error_message(ret), count);
+ LoggerD("badge_set_count() ret : %d, %s, count : %u ", ret, get_error_message(ret), count);
if (ret == BADGE_ERROR_PERMISSION_DENIED) {
return LogAndCreateResult(ErrorCode::SECURITY_ERR, "Security error");
ret = badge_get_count(app_id.c_str(), count);
- LoggerD("badge_get_count() ret : %d count : %d", ret, *count);
+ LoggerD("badge_get_count() ret : %d count : %u", ret, *count);
switch (ret) {
case BADGE_ERROR_NONE:
calendar_record_h attendee;
for (unsigned int i = 0; i < count; ++i) {
- LoggerD("Processing the attendee %d", i);
+ LoggerD("Processing the attendee %u", i);
if (GetChildRecordAt(rec, property, &attendee, i).IsError()) {
LoggerW("Can't get attendee record");
int tick, tick_unit;
calendar_record_h alarm;
for (unsigned int i = 0; i < count; ++i) {
- LoggerD("Processing the alarm %d", i);
+ LoggerD("Processing the alarm %u", i);
if (GetChildRecordAt(rec, property, &alarm, i).IsError()) {
LoggerW("Can't get alarm record");
LoggerD("wait...");
fut.wait();
n = fut.get();
- LoggerD("Phone number [%d] : %s", modem_num, n.c_str());
+ LoggerD("Phone number [%u] : %s", modem_num, n.c_str());
} while (false);
phone_numbers.push_back(n);
'-fvisibility=hidden',
'-Wall',
'-Werror',
+ '-Wformat-signedness',
],
'cflags_c': [
'-std=c11',
int err = contacts_record_get_child_record_at_p(contacts_record, _contacts_contact.messenger,
index, &child_record);
if (CONTACTS_ERROR_NONE != err && CONTACTS_ERROR_NO_DATA != err) {
- LoggerW("Skipping message with index %i. error code: %i", index, err);
+ LoggerW("Skipping message with index %u. error code: %i", index, err);
return PlatformResult(ErrorCode::NO_ERROR);
}
}
if (!im_address) {
- LoggerW("Skipping message with index %i. missing im address", index);
+ LoggerW("Skipping message with index %u. missing im address", index);
return PlatformResult(ErrorCode::NO_ERROR);
}
index, &record);
if (CONTACTS_ERROR_NONE != err && CONTACTS_ERROR_NO_DATA != err) {
// ignoring this record
- LoggerW("Skipping record with index %i. error code: %i", index, err);
+ LoggerW("Skipping record with index %u. error code: %i", index, err);
return PlatformResult(ErrorCode::NO_ERROR);
}
const std::string& processing_method) {
if (type != EXIF_UNDEFINED_TYPE_ASCII && type != EXIF_UNDEFINED_TYPE_JIS &&
type != EXIF_UNDEFINED_TYPE_UNICODE && type != EXIF_UNDEFINED_TYPE_UNDEFINED) {
- LoggerW("Trying to set invalid GPSProcessingMethod type: [%s] len:%d", type.c_str(),
+ LoggerW("Trying to set invalid GPSProcessingMethod type: [%s] len: %zu", type.c_str(),
type.length());
return;
}
void ExifInformation::setUserComment(const std::string& type, const std::string& user_comment) {
if (type != EXIF_UNDEFINED_TYPE_ASCII && type != EXIF_UNDEFINED_TYPE_JIS &&
type != EXIF_UNDEFINED_TYPE_UNICODE && type != EXIF_UNDEFINED_TYPE_UNDEFINED) {
- LoggerW("Trying to set invalid user comment type: [%s] len:%d", type.c_str(), type.length());
+ LoggerW("Trying to set invalid user comment type: [%s] len: %zu", type.c_str(), type.length());
return;
}
}
if (isSet(EXIF_INFORMATION_ATTRIBUTE_ISO_SPEED_RATINGS)) {
std::vector<long long int> iso_ratings = getIsoSpeedRatings();
- LoggerD("Saving iso speed ratings count:%d", iso_ratings.size());
+ LoggerD("Saving iso speed ratings count: %zu", iso_ratings.size());
ret = ExifTagSaver::saveToExif(iso_ratings, EXIF_FORMAT_SHORT, EXIF_TAG_ISO_SPEED_RATINGS,
exif_data);
if (!ret) {
#include <sstream>
#include <string>
+#include "common/filesystem/filesystem_provider.h"
#include "common/logger.h"
#include "common/platform_result.h"
#include "common/task-queue.h"
#include "common/tools.h"
-#include "common/filesystem/filesystem_provider.h"
#include "exif/exif_information.h"
#include "exif/exif_util.h"
ScopeLogger("tag: %d (%p)", tag, exif_data);
ExifEntry* exif_entry = exif_data_get_entry(exif_data, tag);
if (!exif_entry) {
- LoggerE("Exif entry with tag: %d (0x%x) is not present", tag, tag);
+ LoggerE("Exif entry with tag: %d (0x%x) is not present", tag, (unsigned)tag);
return;
}
}
if (entry->size < EXIF_UNDEFINED_TYPE_LENGTH) {
- LoggerW("entry size is invalid %d < EXIF_UNDEFINED_TYPE_LENGTH", entry->size);
+ LoggerW("entry size is invalid %u < EXIF_UNDEFINED_TYPE_LENGTH", entry->size);
return false;
}
result_obj->insert(pair);
LoggerD("Setting ExifInformation gps longitude REF to: WEST");
} else {
- LoggerW("Unknown longitude ref: %c (0x%x)", ref, static_cast<int>(ref));
+ LoggerW("Unknown longitude ref: %c (0x%x)", ref, static_cast<unsigned>(ref));
}
break;
}
result_obj->insert(pair);
LoggerD("Setting ExifInformation gps latitude REF to: SOUTH");
} else {
- LoggerW("Unknown latitude ref: %c (0x%x)", ref, static_cast<int>(ref));
+ LoggerW("Unknown latitude ref: %c (0x%x)", ref, static_cast<unsigned>(ref));
}
break;
}
// UNDEFINED - Any
std::string type, value;
if (DecomposeExifUndefined(entry, type, value)) {
- LoggerD("Extracted GPSProcessingMethod: [%s], len:%d, type:%s", value.c_str(),
+ LoggerD("Extracted GPSProcessingMethod: [%s], len: %zu, type: %s", value.c_str(),
value.length(), type.c_str());
pair = std::make_pair("gpsProcessingMethod", JsonValue(value));
result_obj->insert(pair);
// UNDEFINED - Any
std::string type, value;
if (DecomposeExifUndefined(entry, type, value)) {
- LoggerD("Extracted UserComment: [%s], len:%d, type:%s", value.c_str(), value.length(),
+ LoggerD("Extracted UserComment: [%s], len: %zu, type: %s", value.c_str(), value.length(),
type.c_str());
pair = std::make_pair("userComment", JsonValue(value));
const std::size_t in_file_size = static_cast<size_t>(ftell_val);
fseek(m_in_file, 0, SEEK_SET);
- LoggerD("JPEG file: [%s] size:%d", path.c_str(), in_file_size);
+ LoggerD("JPEG file: [%s] size: %zu", path.c_str(), in_file_size);
if (0 == in_file_size) {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "JPEG file is invalid",
("Input file [%s] is empty!", path.c_str()));
m_in_data = new (std::nothrow) unsigned char[in_file_size];
if (!m_in_data) {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "Memory allocation failed",
- ("Couldn't allocate buffer with size: %d", in_file_size));
+ ("Couldn't allocate buffer with size: %zu", in_file_size));
}
m_in_data_size = in_file_size;
if (read_bytes != m_in_data_size) {
return LogAndCreateResult(
ErrorCode::UNKNOWN_ERR, "Could not read JPEG file",
- ("Couldn't read all: %d bytes. Read only: %u bytes!", m_in_data_size, read_bytes));
+ ("Couldn't read all: %zu bytes. Read only: %zu bytes!", m_in_data_size, read_bytes));
}
if (fclose(m_in_file) == EOF) {
m_padding_data_size = 0;
for (size_t offset = 0, iterration = 0; offset < m_in_data_size; ++iterration) {
- LoggerD("offset:%u | Starting iteration: %u", offset, iterration);
+ LoggerD("offset: %zu | Starting iteration: %zu", offset, iterration);
const std::size_t search_len = 10;
std::size_t search_offset = 0;
for (search_offset = 0; search_offset < search_len; ++search_offset) {
if (search_len == search_offset) {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "JPEG file is invalid",
- ("offset:%u | Couldn't find marker! RAW DATA:{%s}", offset,
+ ("offset: %zu | Couldn't find marker! RAW DATA:{%s}", offset,
getPartOfFile(offset, 0, 10).c_str()));
}
unsigned char* section_begin = m_in_data + section_offset;
offset = section_offset; // Move to section begin
- LoggerD("offset:%u | Moved to section begin", offset);
+ LoggerD("offset: %zu | Moved to section begin", offset);
if (!isJpegMarker(section_begin[1])) {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "JPEG file is invalid",
- ("offset:%u | Is not valid marker: 0x%x RAW DATA:{%s}", offset,
+ ("offset: %zu | Is not valid marker: 0x%x RAW DATA:{%s}", offset,
section_begin[1], getPartOfFile(section_offset, 0, 4).c_str()));
}
const JpegMarker cur_marker = castToJpegMarker(section_begin[1]);
- LoggerD("offset:%u | Found valid marker: 0x%x RAW DATA:{%s}", offset, cur_marker,
+ LoggerD("offset: %zu | Found valid marker: 0x%x RAW DATA:{%s}", offset, (unsigned)cur_marker,
getPartOfFile(section_offset, 0, 4).c_str());
offset += 2; // Read 0xffxx marker tag - 2 bytes
section->type = cur_marker;
m_sections.push_back(section);
if (cur_marker == JPEG_MARKER_SOI || cur_marker == JPEG_MARKER_EOI) {
- LoggerD("offset:%u | Found: %s marker, moving to next marker at:%u", section_offset,
+ LoggerD("offset: %zu | Found: %s marker, moving to next marker at: %zu", section_offset,
((cur_marker == JPEG_MARKER_SOI) ? "SOI" : "EOI"), offset);
if (cur_marker == JPEG_MARKER_EOI && m_padding_data != NULL) {
// size 2 bytes
const long section_data_len = total_section_len - 2;
- LoggerD("offset:%u tag:0x%x | Read total_section_len:%ld (data len:%ld)", section_offset,
- cur_marker, total_section_len, section_data_len);
+ LoggerD("offset: %zu tag:0x%x | Read total_section_len: %ld (data len: %ld)", section_offset,
+ (unsigned)cur_marker, total_section_len, section_data_len);
offset += 2; // Read data size - 2 bytes
if (total_section_len < 0) {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "JPEG file is invalid",
- ("offset:%u tag:0x%x | Error: total_section_len is: %ld < 0",
- offset, cur_marker, total_section_len));
+ ("offset: %zu tag:0x%x | Error: total_section_len is: %ld < 0",
+ offset, (unsigned)cur_marker, total_section_len));
}
if (section_offset + 2 + total_section_len > m_in_data_size) {
return LogAndCreateResult(
ErrorCode::UNKNOWN_ERR, "JPEG file is invalid",
- ("offset:%u tag:0x%x | Error: current section offset:%u"
- " + 2 + total_section_len:%ld = %lu is greater then file size:%u",
- offset, cur_marker, section_offset, total_section_len,
+ ("offset: %zu tag:0x%x | Error: current section offset: %zu"
+ " + 2 + total_section_len: %ld = %lu is greater then file size: %zu",
+ offset, (unsigned)cur_marker, section_offset, total_section_len,
section_offset + total_section_len, m_in_data_size));
}
section->exif_data = exif_data_new_from_data(section_begin, exif_data_size);
LoggerD(
- "offset:%u tag:0x%x | Loading exif from offset:%u"
- " len:%u exif_data_new_from_data returned: %p",
- offset, cur_marker, section_offset, exif_data_size, section->exif_data);
+ "offset: %zu tag:0x%x | Loading exif from offset: %zu"
+ " len: %u exif_data_new_from_data returned: %p",
+ offset, (unsigned)cur_marker, section_offset, exif_data_size, section->exif_data);
if (!section->exif_data) {
- LoggerW("offset:%d tag:0x%x | Couldn't load Exif!", offset, cur_marker);
+ LoggerW("offset: %zu tag:0x%x | Couldn't load Exif!", offset, (unsigned)cur_marker);
}
}
// -2 (exclude ending EOI marker (2 bytes)
std::size_t image_size = m_in_data_size - image_data_offset - 2;
LoggerW(
- "offset:%d tag:0x%x"
- " | Image data offset:%u Estimated image size:%u",
- offset, cur_marker, image_data_offset, image_size);
+ "offset: %zu tag:0x%x"
+ " | Image data offset: %zu Estimated image size: %zu",
+ offset, (unsigned)cur_marker, image_data_offset, image_size);
m_image_data = m_in_data + image_data_offset;
"JPEG file contains image data stream: image_size+= 2");
image_size += 2; // Skip expected EOI tag which is not present
} else {
- LoggerD("EOI tag found at offset: %d from SOS data", eoi_tag_index);
+ LoggerD("EOI tag found at offset: %zu from SOS data", eoi_tag_index);
if (eoi_tag_index != image_size) {
LoggerW(
- "Estimated image size:%d doesn't match EOI tag index:%d"
- " delta:%d",
+ "Estimated image size: %zu doesn't match EOI tag index: %zu"
+ " delta: %zu",
image_size, eoi_tag_index, image_size - eoi_tag_index);
- LoggerW("Setting image_size to EOI tag: %u", eoi_tag_index);
+ LoggerW("Setting image_size to EOI tag: %zu", eoi_tag_index);
image_size = eoi_tag_index;
m_padding_data = m_image_data + image_size + 2; // (skip EOI tag)
m_padding_data_size = (m_in_data + m_in_data_size) - m_padding_data;
- LoggerW("Saving padding data from offset:%d with size:%d", m_padding_data - m_in_data,
- m_padding_data_size);
+ LoggerW("Saving padding data from offset: %td with size: %zu",
+ m_padding_data - m_in_data, m_padding_data_size);
}
}
m_image_size = image_size;
offset = image_data_offset + image_size;
- LoggerD("offset:%u tag:0x%x | SOS Offset moved to next marker", offset, cur_marker);
+ LoggerD("offset: %zu tag:0x%x | SOS Offset moved to next marker", offset,
+ (unsigned)cur_marker);
} else {
offset += section_data_len;
- LoggerD("offset:%u tag:0x%x | Offset moved to next marker", offset, cur_marker);
+ LoggerD("offset: %zu tag:0x%x | Offset moved to next marker", offset, (unsigned)cur_marker);
}
}
}
bool JpegFile::searchForTagInBuffer(const unsigned char* buffer_start,
const unsigned char* buffer_end, const JpegMarker marker,
std::size_t& out_index) {
- ScopeLogger("start:%p end:%p marker:0x%x", buffer_start, buffer_end, marker);
+ ScopeLogger("start: %p end: %p marker:0x%x", buffer_start, buffer_end, (unsigned)marker);
if (!buffer_start) {
LoggerE("buffer_start is NULL");
return false;
}
- LoggerD("Bytes to scan: %d", static_cast<size_t>(buffer_end - buffer_start));
+ LoggerD("Bytes to scan: %zu", static_cast<size_t>(buffer_end - buffer_start));
const unsigned char marker_uchar = static_cast<unsigned char>(marker);
for (const unsigned char* ptr = buffer_start; ptr < buffer_end; ++ptr) {
}
PlatformResult JpegFile::saveToFile(const std::string& out_path) {
- ScopeLogger("out_path:%s", out_path.c_str());
+ ScopeLogger("out_path: %s", out_path.c_str());
PlatformResult status = saveToFilePriv(out_path);
if (status) return status;
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "Couldn't restore whole file",
("Couldn't restore whole JPEG! "
- "Only %d of %d bytes have been wrote!",
+ "Only %zu of %zu bytes have been wrote!",
bytes_wrote, m_in_data_size));
}
if (EOF == fclose(outf)) {
}
PlatformResult JpegFile::saveToFilePriv(const std::string& out_path) {
- ScopeLogger("out_path:%s", out_path.c_str());
+ ScopeLogger("out_path: %s", out_path.c_str());
m_out_file = fopen(out_path.c_str(), "wb");
if (!m_out_file) {
JpegFileSectionPtr cur = *it;
const JpegMarker cur_marker = cur->type;
- LoggerD("offset:%d | Section: %d marker 0x%x", offset, section_index, cur_marker);
+ LoggerD("offset: %zu | Section: %d marker 0x%x", offset, section_index, (unsigned)cur_marker);
std::size_t bytes_to_write = 0;
std::size_t bytes_wrote = 0;
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "Could not save Exif in JPEG file");
}
- LoggerD("offset:%d | Generated Exif RAW Data length:%d", offset, exif_output_size);
+ LoggerD("offset: %zu | Generated Exif RAW Data length: %u", offset, exif_output_size);
exif_output_data.reset(tmp);
if (exif_output_size > MAX_AVAILABLE_JPEG_SECTION_DATA_SIZE) {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR,
"Exif data is to big to be saved in JPEG file",
- ("exif_output_size:%d is greater then maximum JPEG section"
- "data block size: %d",
+ ("exif_output_size: %u is greater then maximum JPEG section"
+ "data block size: %u",
exif_output_size, MAX_AVAILABLE_JPEG_SECTION_DATA_SIZE));
}
section_size += exif_output_size;
}
LoggerD(
- "offset:%d | Writing section:"
- " marker:0x%x size:%d",
- offset, cur_marker, cur->size);
+ "offset: %zu | Writing section:"
+ " marker:0x%x size: %d",
+ offset, (unsigned)cur_marker, cur->size);
bytes_wrote = fwrite(tmp_buf, 1, bytes_to_write, m_out_file);
offset += bytes_wrote;
if (bytes_wrote != bytes_to_write) {
return LogAndCreateResult(
ErrorCode::UNKNOWN_ERR, "Could not write JPEG file",
- ("Couldn't wrote %d bytes! Only %d bytes wrote", bytes_to_write, bytes_wrote));
+ ("Couldn't wrote %zu bytes! Only %zu bytes wrote", bytes_to_write, bytes_wrote));
}
if (write_section_data && cur->size > 0) {
- LoggerD("offset:%d | Writing data with length:%d", offset, cur->size);
+ LoggerD("offset: %zu | Writing data with length: %d", offset, cur->size);
bytes_to_write = cur->size;
bytes_wrote = fwrite(cur->data_ptr, 1, bytes_to_write, m_out_file);
if (bytes_wrote != bytes_to_write) {
return LogAndCreateResult(
ErrorCode::UNKNOWN_ERR, "Could not write JPEG file",
- ("Couldn't wrote %d bytes! Only %d bytes wrote", bytes_to_write, bytes_wrote));
+ ("Couldn't wrote %zu bytes! Only %zu bytes wrote", bytes_to_write, bytes_wrote));
}
}
if (write_exif_data && exif_output_data && exif_output_size > 0) {
- LoggerD("offset:%d | Writing new exif data with length:%d", offset, exif_output_size);
+ LoggerD("offset: %zu | Writing new exif data with length: %u", offset, exif_output_size);
bytes_to_write = exif_output_size;
bytes_wrote = fwrite(exif_output_data.get(), 1, bytes_to_write, m_out_file);
if (bytes_wrote != bytes_to_write) {
return LogAndCreateResult(
ErrorCode::UNKNOWN_ERR, "Could not write JPEG file",
- ("Couldn't wrote %d bytes! Only %d bytes wrote", bytes_to_write, bytes_wrote));
+ ("Couldn't wrote %zu bytes! Only %zu bytes wrote", bytes_to_write, bytes_wrote));
}
}
if (JPEG_MARKER_SOS == cur_marker) {
- LoggerD("offset:%d | Writing image data stream with lenght:%d", offset, m_image_size);
+ LoggerD("offset: %zu | Writing image data stream with lenght: %zu", offset, m_image_size);
bytes_to_write = m_image_size;
bytes_wrote = fwrite(m_image_data, 1, bytes_to_write, m_out_file);
if (bytes_wrote != bytes_to_write) {
return LogAndCreateResult(
ErrorCode::UNKNOWN_ERR, "Could not write JPEG file",
- ("Couldn't wrote %d bytes! Only %d bytes wrote", bytes_to_write, bytes_wrote));
+ ("Couldn't wrote %zu bytes! Only %zu bytes wrote", bytes_to_write, bytes_wrote));
}
}
}
if (m_padding_data && m_padding_data_size > 0) {
- LoggerD("Padding data exists and contains:%d bytes saving to JPEG file", m_padding_data_size);
+ LoggerD("Padding data exists and contains: %zu bytes saving to JPEG file", m_padding_data_size);
const std::size_t bytes_wrote = fwrite(m_image_data, 1, m_padding_data_size, m_out_file);
if (bytes_wrote != m_padding_data_size) {
return LogAndCreateResult(
ErrorCode::UNKNOWN_ERR, "Could not write JPEG file",
- ("Couldn't wrote %d bytes! Only %d bytes wrote", m_padding_data_size, bytes_wrote));
+ ("Couldn't wrote %zu bytes! Only %zu bytes wrote", m_padding_data_size, bytes_wrote));
}
}
first_exif_section = cur;
} else {
LoggerW(
- "Warning: found %d APP1/Exif sections -"
+ "Warning: found %zu APP1/Exif sections -"
" only first is currently supported!",
num_exif_sections);
}
}
FilesystemInstance::Worker::~Worker() {
- if(!exit && thread.joinable()) {
+ if (!exit && thread.joinable()) {
stop();
}
}
IOException("File doesn't contain UTF-8 encoded string with given length"), out);
return;
}
- LoggerD("char_count: %ld", char_count);
+ LoggerD("char_count: %lu", char_count);
LoggerD("ftell: %ld", ftell(handle->file_handle));
if (!(std::feof(
handle->file_handle))) { // read number of characters if not whole file read
return ConvertRecordedTime(data, obj);
};
- monitors_.insert(std::make_pair(kActivityTypePedometer,
- std::make_shared<Monitor::PedometerMonitor>()));
+ monitors_.insert(
+ std::make_pair(kActivityTypePedometer, std::make_shared<Monitor::PedometerMonitor>()));
monitors_.insert(std::make_pair(kActivityTypeWristUp,
std::make_shared<Monitor::GestureMonitor>(kActivityTypeWristUp)));
monitors_.insert(std::make_pair(kActivityTypeSleepDetector,
*/
AttributeRangeFilterPtr castToAttributeRangeFilter(AbstractFilterPtr from);
-
} // Tizen
} // DeviceAPI
LoggerD("[%d] matched filter: %s", i, matched ? "YES" : "NO");
}
- LoggerD("returning matching %d of %d conversations", filtered_conversations.size(),
+ LoggerD("returning matching %zu of %zu conversations", filtered_conversations.size(),
source_conversations.size());
return filtered_conversations;
}
void ConversationsChangeCallback::added(const ConversationPtrVector& conversations) {
- ScopeLogger("conversations.size() = %d", conversations.size());
+ ScopeLogger("conversations.size() = %zu", conversations.size());
if (!m_is_act) {
return;
}
};
for_each(filtered.begin(), filtered.end(), each);
- LoggerD("Calling:%s with:%d added conversations", CONVERSATIONSADDED, filtered.size());
+ LoggerD("Calling:%s with:%zu added conversations", CONVERSATIONSADDED, filtered.size());
m_callback_data.SetAction(CONVERSATIONSADDED, picojson::value(array));
m_callback_data.AddAndPost(PostPriority::MEDIUM);
}
void ConversationsChangeCallback::updated(const ConversationPtrVector& conversations) {
- ScopeLogger("conversations.size() = %d", conversations.size());
+ ScopeLogger("conversations.size() = %zu", conversations.size());
if (!m_is_act) {
return;
}
};
for_each(filtered.begin(), filtered.end(), each);
- LoggerD("Calling:%s with:%d added conversations", CONVERSATIONSUPDATED, filtered.size());
+ LoggerD("Calling:%s with:%zu added conversations", CONVERSATIONSUPDATED, filtered.size());
m_callback_data.SetAction(CONVERSATIONSUPDATED, picojson::value(array));
m_callback_data.AddAndPost(PostPriority::LOW);
}
void ConversationsChangeCallback::removed(const ConversationPtrVector& conversations) {
- ScopeLogger("conversations.size() = %d", conversations.size());
+ ScopeLogger("conversations.size() = %zu", conversations.size());
if (!m_is_act) {
return;
}
};
for_each(filtered.begin(), filtered.end(), each);
- LoggerD("Calling:%s with:%d added conversations", CONVERSATIONSREMOVED, filtered.size());
+ LoggerD("Calling:%s with:%zu added conversations", CONVERSATIONSREMOVED, filtered.size());
m_callback_data.SetAction(CONVERSATIONSREMOVED, picojson::value(array));
m_callback_data.AddAndPost(PostPriority::LAST);
return platform_result;
}
- LoggerD("Mail: [%d] contains: [%d] attachments", msgAttachment->getMessageId(),
+ LoggerD("Mail: [%d] contains: [%zu] attachments", msgAttachment->getMessageId(),
attachments.size());
auto it = attachments.begin();
if (it != m_deleteRequests.end()) {
LoggerD("Found request");
if (NOTI_MAIL_DELETE_FINISH == status) {
- LoggerD("Successfully removed %d mails", ids.size());
+ LoggerD("Successfully removed %zu mails", ids.size());
it->messagesDeleted += ids.size();
}
MessagesCallbackUserData* callback = it->callback;
}
// Complete task
- LoggerD("callback: %p error: %d messages.size() = %d", callback, callback->IsError(),
+ LoggerD("callback: %p error: %d messages.size() = %zu", callback, callback->IsError(),
callback->getMessages().size());
if (callback->IsError()) {
}
// Complete task
- LoggerD("callback: %p error:%d conversations.size()=%d", callback, callback->IsError(),
+ LoggerD("callback: %p error:%d conversations.size()=%zu", callback, callback->IsError(),
callback->getConversations().size());
if (callback->IsError()) {
}
// Complete task
- LoggerD("callback: %p error:%d folders.size()=%d", callback, callback->IsError(),
+ LoggerD("callback: %p error:%d folders.size()=%zu", callback, callback->IsError(),
callback->getFolders().size());
if (callback->IsError()) {
}
void FoldersChangeCallback::added(const FolderPtrVector& folders) {
- ScopeLogger("folders.size() = %d", folders.size());
+ ScopeLogger("folders.size() = %zu", folders.size());
if (!m_is_act) {
return;
}
};
for_each(filtered.begin(), filtered.end(), each);
- LoggerD("Calling:%s with:%d added folders", FOLDERSADDED, filtered.size());
+ LoggerD("Calling:%s with:%zu added folders", FOLDERSADDED, filtered.size());
m_callback_data.SetAction(FOLDERSADDED, picojson::value(array));
m_callback_data.AddAndPost(PostPriority::MEDIUM);
}
void FoldersChangeCallback::updated(const FolderPtrVector& folders) {
- ScopeLogger("folders.size() = %d", folders.size());
+ ScopeLogger("folders.size() = %zu", folders.size());
if (!m_is_act) {
return;
}
};
for_each(filtered.begin(), filtered.end(), each);
- LoggerD("Calling:%s with:%d updated folders", FOLDERSUPDATED, filtered.size());
+ LoggerD("Calling:%s with:%zu updated folders", FOLDERSUPDATED, filtered.size());
m_callback_data.SetAction(FOLDERSUPDATED, picojson::value(array));
m_callback_data.AddAndPost(PostPriority::LOW);
}
void FoldersChangeCallback::removed(const FolderPtrVector& folders) {
- ScopeLogger("folders.size() = %d", folders.size());
+ ScopeLogger("folders.size() = %zu", folders.size());
if (!m_is_act) {
return;
}
};
for_each(filtered.begin(), filtered.end(), each);
- LoggerD("Calling:%s with:%d removed folders", FOLDERSREMOVED, filtered.size());
+ LoggerD("Calling:%s with:%zu removed folders", FOLDERSREMOVED, filtered.size());
m_callback_data.SetAction(FOLDERSREMOVED, picojson::value(array));
m_callback_data.AddAndPost(PostPriority::LAST);
AttachmentPtrVector attachments = message->getMessageAttachments();
AttachmentPtrVector inlineAttachments = message->getBody()->getInlineAttachments();
- LoggerD("Attachments size: %d", attachments.size());
- LoggerD("Inline attachments size: %d", inlineAttachments.size());
+ LoggerD("Attachments size: %zu", attachments.size());
+ LoggerD("Inline attachments size: %zu", inlineAttachments.size());
LoggerD("Adding attachments for mail id = [%d]\n", message->getId());
for (auto it = attachments.begin(); it != attachments.end(); ++it) {
PlatformResult ret = addSingleEmailAttachment(message, *it, AttachmentType::EXTERNAL);
for (unsigned int i = 0; i < size; ++i) {
char* address = const_cast<char*>(recipients.at(i).c_str());
- LoggerD("[%d] address:[%s]", i, address);
+ LoggerD("[%u] address:[%s]", i, address);
msg_struct_t tmpAddr = NULL;
if (MSG_SUCCESS == msg_list_add_item(msg, MSG_MESSAGE_ADDR_LIST_HND, &tmpAddr)) {
msg_set_int_value(tmpAddr, MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
msg_set_str_value(tmpAddr, MSG_ADDRESS_INFO_ADDRESS_VALUE_STR, address, strlen(address));
} else {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "failed to add address",
- ("failed to add address[%d] %s", i, address));
+ ("failed to add address[%u] %s", i, address));
}
}
return PlatformResult(ErrorCode::NO_ERROR);
}
char* address = const_cast<char*>(recipients.at(i).c_str());
- LoggerD("[%d] address:[%s] address_type:%d type:%d", i, address, address_type, type);
+ LoggerD("[%u] address:[%s] address_type:%d type:%d", i, address, address_type, type);
int error = msg_list_add_item(msg, MSG_MESSAGE_ADDR_LIST_HND, &tmpAddr);
if (MSG_SUCCESS == error) {
msg_set_str_value(tmpAddr, MSG_ADDRESS_INFO_ADDRESS_VALUE_STR, address, strlen(address));
} else {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "failed to add address",
- ("[%d] failed to add address: [%s], error: %d", i, address, error));
+ ("[%u] failed to add address: [%s], error: %d", i, address, error));
}
}
return PlatformResult(ErrorCode::NO_ERROR);
PlatformResult Message::addMMSBodyAndAttachmentsToStruct(const AttachmentPtrVector& attach,
msg_struct_t& mms_struct,
Message* message) {
- ScopeLogger("attachments.size() = %zd", attach.size());
+ ScopeLogger("attachments.size() = %zu", attach.size());
int size = attach.size();
for (int i = 0; i < size; i++) {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "msg_get_message() Fail",
("msg_get_message() Fail [%d] (%s)", err, get_error_message(err)));
}
- LoggerD("Using existing msg for id: %d", id);
+ LoggerD("Using existing msg for id: %u", id);
} else { // id is not set - the message does not exist in database
MessageType msgType = message->getType();
if (msgType == MessageType::SMS) {
}
// Set MMS attachments
AttachmentPtrVector attach_list = message->getMessageAttachments();
- LoggerD("Message(%p): id:%d subject:[%s] plainBody:[%s] contains %d attachments", message,
+ LoggerD("Message(%p): id:%d subject:[%s] plainBody:[%s] contains %zu attachments", message,
message->getId(), message->getSubject().c_str(),
message->getBody()->getPlainBody().c_str(), attach_list.size());
LoggerD(
"[p:%d, m:%d] added attachment: %p "
"(mime:0x%x mime:%s messageId:%d)",
- p, m, att, msg_media_type, msg_media_type_str.c_str(), ma->getMessageId());
+ p, m, att, (unsigned)msg_media_type, msg_media_type_str.c_str(),
+ ma->getMessageId());
}
msg_release_struct(&media);
LoggerW("Warning: body has not been set!");
}
- LoggerD("after MSG_MMS_PAGE_LIST attachments count is:%d", message->m_attachments.size());
+ LoggerD("after MSG_MMS_PAGE_LIST attachments count is:%zu", message->m_attachments.size());
// if there are some other attachments add it to attachments vector
msg_list_handle_t attach_list = NULL;
ma->setMimeType(type);
MessageAttachment* att = ma.get();
- LoggerD("[att:%d] added attachement: %p (mime:0x%x mime:%s path:%s id:%d)", i, att, tempInt,
- type.c_str(), infoStr, ma->getId());
+ LoggerD("[att:%d] added attachement: %p (mime:0x%x mime:%s path:%s id:%d)", i, att,
+ (unsigned)tempInt, type.c_str(), infoStr, ma->getId());
message->m_attachments.push_back(ma);
message->m_has_attachment = true;
("msg_get_list_handle error: %d (%s)", error, get_error_message(error)));
}
- LoggerD("after MSG_MMS_ATTACH_LIST attachments count is:%d", message->m_attachments.size());
+ LoggerD("after MSG_MMS_ATTACH_LIST attachments count is:%zu", message->m_attachments.size());
msg_release_struct(&mms_struct);
return PlatformResult(ErrorCode::NO_ERROR);
}
MessagePtrVector MessagesChangeCallback::filterMessages(tizen::AbstractFilterPtr filter,
const MessagePtrVector& source_messages,
const int service_id) {
- ScopeLogger("sourceMessages.size() = %d filter %s", source_messages.size(),
+ ScopeLogger("sourceMessages.size() = %zu filter %s", source_messages.size(),
(filter ? "PRESENT" : "NULL"));
if (filter) {
LoggerD("}");
}
- LoggerD("returning matching %d of %d messages", filtered_messages.size(),
+ LoggerD("returning matching %zu of %zu messages", filtered_messages.size(),
source_messages.size());
return filtered_messages;
} else {
}
void MessagesChangeCallback::added(const MessagePtrVector& msgs) {
- ScopeLogger("event: msgs.size() = %d", msgs.size());
+ ScopeLogger("event: msgs.size() = %zu", msgs.size());
if (!m_is_act) {
return;
}
for_each(filtered_msgs.begin(), filtered_msgs.end(), each);
- LoggerD("Calling:%s with:%d added messages", MESSAGESADDED, filtered_msgs.size());
+ LoggerD("Calling:%s with:%zu added messages", MESSAGESADDED, filtered_msgs.size());
m_callback_data.SetAction(MESSAGESADDED, picojson::value(array));
m_callback_data.AddAndPost(PostPriority::MEDIUM);
}
void MessagesChangeCallback::updated(const MessagePtrVector& msgs) {
- ScopeLogger("event: msgs.size() = %d", msgs.size());
+ ScopeLogger("event: msgs.size() = %zu", msgs.size());
if (!m_is_act) {
return;
}
for_each(filtered_msgs.begin(), filtered_msgs.end(), each);
- LoggerD("Calling:%s with:%d updated messages", MESSAGESUPDATED, filtered_msgs.size());
+ LoggerD("Calling:%s with:%zu updated messages", MESSAGESUPDATED, filtered_msgs.size());
m_callback_data.SetAction(MESSAGESUPDATED, picojson::value(array));
m_callback_data.AddAndPost(PostPriority::LOW);
}
void MessagesChangeCallback::removed(const MessagePtrVector& msgs) {
- ScopeLogger("event: msgs.size() = %d", msgs.size());
+ ScopeLogger("event: msgs.size() = %zu", msgs.size());
if (!m_is_act) {
return;
}
for_each(filtered_msgs.begin(), filtered_msgs.end(), each);
- LoggerD("Calling:%s with:%d removed messages", MESSAGESREMOVED, filtered_msgs.size());
+ LoggerD("Calling:%s with:%zu removed messages", MESSAGESREMOVED, filtered_msgs.size());
m_callback_data.SetAction(MESSAGESREMOVED, picojson::value(array));
m_callback_data.AddAndPost(PostPriority::LAST);
} else {
std::shared_ptr<Message> message = callback->getMessage();
- LoggerD("Calling success callback with: %d recipients", message->getTO().size());
+ LoggerD("Calling success callback with: %zu recipients", message->getTO().size());
std::vector<picojson::value> recipients;
auto addToRecipients = [&recipients](std::string& e) -> void {
msg_storage_change_type_t storageChangeType,
ShortMsgManager* shortMsgManager) {
ScopeLogger(
- "event.items.size()=%d event.removed_conversations.size()=%d"
+ "event.items.size()=%zu event.removed_conversations.size()=%zu"
" sChangeType:%d",
event->items.size(), event->removed_conversations.size(), storageChangeType);
cur_conv->getConversationId(), cur_conv->getLastMessageId());
}
- LoggerD("num conversations:all=%d added=%d update=%d", eventConv->items.size(),
+ LoggerD("num conversations:all=%zu added=%zu update=%zu", eventConv->items.size(),
added_conv.size(), updated_conv.size());
if (false == added_conv.empty()) {
- LoggerD("%d new conversations, calling onConversationAdded", added_conv.size());
+ LoggerD("%zu new conversations, calling onConversationAdded", added_conv.size());
eventConv->items = added_conv;
ChangeListenerContainer::getInstance().callConversationAdded(eventConv);
}
if (false == updated_conv.empty()) {
- LoggerD("%d updated conversation, calling onConversationUpdated", updated_conv.size());
+ LoggerD("%zu updated conversation, calling onConversationUpdated", updated_conv.size());
eventConv->items = updated_conv;
ChangeListenerContainer::getInstance().callConversationUpdated(eventConv);
}
for (int i = 0; i < pMsgIdList->nCount; ++i) {
const msg_message_id_t& msg_id = pMsgIdList->msgIdList[i];
- LoggerD("pMsgIdList[%d] = %d", i, msg_id);
+ LoggerD("pMsgIdList[%d] = %u", i, msg_id);
std::map<int, MessagePtr>::iterator it = cur_rem_msgs.find(msg_id);
if (it != cur_rem_msgs.end()) {
return;
}
- LoggerD("messages to update: %d", callback->getMessages().size());
+ LoggerD("messages to update: %zu", callback->getMessages().size());
{
std::lock_guard<std::mutex> lock(m_mutex);
PlatformResult ShortMsgManager::getConversationsForMessages(
MessagePtrVector messages, msg_storage_change_type_t storageChangeType,
ConversationPtrVector* result, ShortMsgManager* shortMsgManager) {
- ScopeLogger("messages.size()=%d storageChangeType=%d", messages.size(), storageChangeType);
+ ScopeLogger("messages.size()=%zu storageChangeType=%d", messages.size(), storageChangeType);
std::unordered_set<int> unique_conv_ids;
ConversationPtrVector convs;
if (callback->IsError()) {
LoggerD("Calling error callback");
} else {
- LoggerD("Calling success callback with %d messages:", callback->getMessages().size());
+ LoggerD("Calling success callback with %zu messages:", callback->getMessages().size());
std::vector<picojson::value> response;
auto messages = callback->getMessages();
ConversationPtr conv = (*it);
msg_thread_id_t conv_id = conv->getConversationId();
- LoggerD("[%d] MessageConversation(%p) conv_id:%d", conv_index, conv.get(), conv_id);
+ LoggerD("[%d] MessageConversation(%p) conv_id:%u", conv_index, conv.get(), conv_id);
msg_struct_list_s conv_view_list;
error = msg_get_conversation_view_list(handle, (msg_thread_id_t)conv_id, &conv_view_list);
LoggerD(
"[%d] message[%d] msg_id:%d,"
- "saved MessageConversation(%p) with conv_id:%d",
+ "saved MessageConversation(%p) with conv_id:%u",
conv_index, msg_index, cur_msg_id, conv.get(), conv_id);
} else {
LoggerE("[%d] Couldn't get msg_id, error: %s!", error, get_error_message(error));
}
}
} else {
- LoggerE("[%d] Couldn' get conversation view list for conv_id:%d error: %d", conv_index,
+ LoggerE("[%d] Couldn' get conversation view list for conv_id:%u error: %d", conv_index,
conv_id, error);
}
ShortMsgManager::~ShortMsgManager() {
ScopeLogger();
- LoggerD("m_sms_removed_messages.size() = %d", m_sms_removed_messages.size());
- LoggerD("m_mms_removed_messages.size() = %d", m_mms_removed_messages.size());
- LoggerD("m_sms_removed_msg_id_conv_id_map.size() = %d", m_sms_removed_msg_id_conv_id_map.size());
- LoggerD("m_sms_removed_conv_id_object_map.size() = %d", m_sms_removed_conv_id_object_map.size());
- LoggerD("m_mms_removed_msg_id_conv_id_map.size() = %d", m_mms_removed_msg_id_conv_id_map.size());
- LoggerD("m_mms_removed_conv_id_object_map.size() = %d", m_mms_removed_conv_id_object_map.size());
+ LoggerD("m_sms_removed_messages.size() = %zu", m_sms_removed_messages.size());
+ LoggerD("m_mms_removed_messages.size() = %zu", m_mms_removed_messages.size());
+ LoggerD("m_sms_removed_msg_id_conv_id_map.size() = %zu", m_sms_removed_msg_id_conv_id_map.size());
+ LoggerD("m_sms_removed_conv_id_object_map.size() = %zu", m_sms_removed_conv_id_object_map.size());
+ LoggerD("m_mms_removed_msg_id_conv_id_map.size() = %zu", m_mms_removed_msg_id_conv_id_map.size());
+ LoggerD("m_mms_removed_conv_id_object_map.size() = %zu", m_mms_removed_conv_id_object_map.size());
}
std::string ShortMsgManager::getMessageStatus(int id) {
ScopeLogger();
if (result.IsError()) {
return result;
}
- LoggerD("Card emulation mode value: %x", (int)new_mode);
+ LoggerD("Card emulation mode value: %x", (unsigned)new_mode);
std::string current_mode = "";
result = GetCardEmulationMode(¤t_mode);
LoggerD("Error: %s", result.message().c_str());
return result;
}
- LoggerD("Secure element type value: %x", (int)new_type);
+ LoggerD("Secure element type value: %x", (unsigned)new_type);
std::string current_type = "";
result = GetActiveSecureElement(¤t_type);
obj.insert(make_pair("action", picojson::value("ondetach")));
NFCAdapter::GetInstance()->RespondAsync(event.serialize().c_str());
} else { // ERROR - should never happen
- LoggerE("Invalid NFC discovered type: %d (%x)", type, type);
+ LoggerE("Invalid NFC discovered type: %d (%x)", type, (unsigned)type);
}
}
if (aids.empty()) {
return LogAndCreateResult(ErrorCode::ABORT_ERR, "No AID registered");
}
- LoggerD("Found %d AIDs", aids.size());
+ LoggerD("Found %zu AIDs", aids.size());
int ret = nfc_se_set_preferred_handler();
if (ret != NFC_ERROR_NONE) {
break;
default:
return LogAndCreateResult(ErrorCode::TYPE_MISMATCH_ERR, "No Match Card Emulation mode",
- ("No Match Card Emulation mode: %x", card_mode));
+ ("No Match Card Emulation mode: %x", (unsigned)card_mode));
}
return PlatformResult(ErrorCode::NO_ERROR);
}
break;
default:
return LogAndCreateResult(ErrorCode::TYPE_MISMATCH_ERR, "No Match Secure Element Type",
- ("No Match Secure Element Type: %x", se_type));
+ ("No Match Secure Element Type: %x", (unsigned)se_type));
}
return PlatformResult(ErrorCode::NO_ERROR);
}
#include <functional>
#include <string>
+#include "common/filesystem/filesystem_provider.h"
#include "common/logger.h"
#include "common/picojson.h"
#include "common/task-queue.h"
#include "common/tools.h"
#include "package/package_info_provider.h"
-#include "common/filesystem/filesystem_provider.h"
namespace extension {
namespace package {
}
void SoundManager::VolumeChangeCallback(sound_type_e type, unsigned int value) {
- ScopeLogger("VolumeChangeCallback: type: %d, value: %d", type, value);
+ ScopeLogger("VolumeChangeCallback: type: %d, value: %u", type, value);
// Prepare response
picojson::value response = picojson::value(picojson::object());
// handling storages from provider
common::FilesystemProvider& provider(common::FilesystemProvider::Create());
auto storages = provider.GetStorages();
- LoggerD("Storages found %d", storages.size());
+ LoggerD("Storages found %zu", storages.size());
for (auto storage : storages) {
if (storage->state() == common::StorageState::kMounted) {
unsigned long long available;
LogAndReturnTizenError(common::AbortError(ret), ("bundle_add() failed"));
}
- int ret_widget = widget_service_trigger_update(widget_id.c_str(), instance_id.c_str(), data, force);
+ int ret_widget =
+ widget_service_trigger_update(widget_id.c_str(), instance_id.c_str(), data, force);
if (WIDGET_ERROR_NONE != ret_widget) {
LogAndReturnTizenError(WidgetServiceUtils::ConvertErrorCode(ret_widget),
("widget_service_trigger_update() failed"));
bundle_free(bundle_data);
};
- int ret_widget = widget_service_get_content_of_widget_instance(widget_id.c_str(), instance_id.c_str(),
- &bundle_data);
+ int ret_widget = widget_service_get_content_of_widget_instance(
+ widget_id.c_str(), instance_id.c_str(), &bundle_data);
if (WIDGET_ERROR_NONE != ret_widget) {
LoggerE("widget_service_get_content_of_widget_instance() failed");
this->Post(token, WidgetServiceUtils::ConvertErrorCode(ret_widget));