Skip to content

Commit 9cb3785

Browse files
committed
tools/idevicecrashreport: Silence GCC compiler warning
1 parent 81b12f0 commit 9cb3785

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/idevicecrashreport.c

+3
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,11 @@ static int afc_client_copy_and_remove_crash_reports(afc_client_t afc, const char
163163
char* p = strrchr(list[k], '.');
164164
if (p != NULL && !strncmp(p, ".synced", 7)) {
165165
/* make sure to strip ".synced" extension as seen on iOS 5 */
166+
#pragma GCC diagnostic push
167+
#pragma GCC diagnostic ignored "-Wstringop-truncation"
166168
int newlen = strlen(list[k]) - 7;
167169
strncpy(((char*)target_filename) + host_directory_length, list[k], newlen);
170+
#pragma GCC diagnostic pop
168171
target_filename[host_directory_length + newlen] = '\0';
169172
} else {
170173
strcpy(((char*)target_filename) + host_directory_length, list[k]);

0 commit comments

Comments
 (0)