Fossil SCM
Fix harmless compiler warnings in tar.c.
Commit
073725ae0cf983c683ad31d0cab8321ae846d4ce
Parent
9515143de585808…
1 file changed
+7
-5
+7
-5
| --- src/tar.c | ||
| +++ src/tar.c | ||
| @@ -201,11 +201,10 @@ | ||
| 201 | 201 | int split; |
| 202 | 202 | |
| 203 | 203 | /* if this is a Pax Interchange header prepend "PaxHeader/" |
| 204 | 204 | ** so we can tell files apart from metadata */ |
| 205 | 205 | if( bHeader ){ |
| 206 | - int n; | |
| 207 | 206 | blob_reset(&tball.pax); |
| 208 | 207 | blob_appendf(&tball.pax, "PaxHeader/%*.*s", nName, nName, zName); |
| 209 | 208 | zName = blob_buffer(&tball.pax); |
| 210 | 209 | nName = blob_size(&tball.pax); |
| 211 | 210 | } |
| @@ -288,15 +287,17 @@ | ||
| 288 | 287 | /* set mode and modification time */ |
| 289 | 288 | sqlite3_snprintf(8, (char*)&tball.aHdr[100], "%07o", iMode); |
| 290 | 289 | sqlite3_snprintf(12, (char*)&tball.aHdr[136], "%011o", mTime); |
| 291 | 290 | |
| 292 | 291 | /* see if we need to output a Pax Interchange Header */ |
| 293 | - if( !is_iso646_name(zName, nName) || | |
| 294 | - !tar_split_path(zName, nName, tball.aHdr, &tball.aHdr[345]) ){ | |
| 292 | + if( !is_iso646_name(zName, nName) | |
| 293 | + || !tar_split_path(zName, nName, (char*)tball.aHdr, (char*)&tball.aHdr[345]) | |
| 294 | + ){ | |
| 295 | 295 | int lastPage; |
| 296 | 296 | /* add a file name for interoperability with older programs */ |
| 297 | - approximate_split_path(zName, nName, tball.aHdr, &tball.aHdr[345], 1); | |
| 297 | + approximate_split_path(zName, nName, (char*)tball.aHdr, | |
| 298 | + (char*)&tball.aHdr[345], 1); | |
| 298 | 299 | |
| 299 | 300 | /* generate the Pax Interchange path header */ |
| 300 | 301 | blob_reset(&tball.pax); |
| 301 | 302 | add_pax_header("path", zName, nName); |
| 302 | 303 | |
| @@ -311,11 +312,12 @@ | ||
| 311 | 312 | if( lastPage!=0 ){ |
| 312 | 313 | gzip_step(tball.zSpaces, 512 - lastPage); |
| 313 | 314 | } |
| 314 | 315 | |
| 315 | 316 | /* generate an approximate path for the regular header */ |
| 316 | - approximate_split_path(zName, nName, tball.aHdr, &tball.aHdr[345], 0); | |
| 317 | + approximate_split_path(zName, nName, (char*)tball.aHdr, | |
| 318 | + (char*)&tball.aHdr[345], 0); | |
| 317 | 319 | } |
| 318 | 320 | /* set the size */ |
| 319 | 321 | sqlite3_snprintf(12, (char*)&tball.aHdr[124], "%011o", iSize); |
| 320 | 322 | |
| 321 | 323 | /* write the regular header */ |
| 322 | 324 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -201,11 +201,10 @@ | |
| 201 | int split; |
| 202 | |
| 203 | /* if this is a Pax Interchange header prepend "PaxHeader/" |
| 204 | ** so we can tell files apart from metadata */ |
| 205 | if( bHeader ){ |
| 206 | int n; |
| 207 | blob_reset(&tball.pax); |
| 208 | blob_appendf(&tball.pax, "PaxHeader/%*.*s", nName, nName, zName); |
| 209 | zName = blob_buffer(&tball.pax); |
| 210 | nName = blob_size(&tball.pax); |
| 211 | } |
| @@ -288,15 +287,17 @@ | |
| 288 | /* set mode and modification time */ |
| 289 | sqlite3_snprintf(8, (char*)&tball.aHdr[100], "%07o", iMode); |
| 290 | sqlite3_snprintf(12, (char*)&tball.aHdr[136], "%011o", mTime); |
| 291 | |
| 292 | /* see if we need to output a Pax Interchange Header */ |
| 293 | if( !is_iso646_name(zName, nName) || |
| 294 | !tar_split_path(zName, nName, tball.aHdr, &tball.aHdr[345]) ){ |
| 295 | int lastPage; |
| 296 | /* add a file name for interoperability with older programs */ |
| 297 | approximate_split_path(zName, nName, tball.aHdr, &tball.aHdr[345], 1); |
| 298 | |
| 299 | /* generate the Pax Interchange path header */ |
| 300 | blob_reset(&tball.pax); |
| 301 | add_pax_header("path", zName, nName); |
| 302 | |
| @@ -311,11 +312,12 @@ | |
| 311 | if( lastPage!=0 ){ |
| 312 | gzip_step(tball.zSpaces, 512 - lastPage); |
| 313 | } |
| 314 | |
| 315 | /* generate an approximate path for the regular header */ |
| 316 | approximate_split_path(zName, nName, tball.aHdr, &tball.aHdr[345], 0); |
| 317 | } |
| 318 | /* set the size */ |
| 319 | sqlite3_snprintf(12, (char*)&tball.aHdr[124], "%011o", iSize); |
| 320 | |
| 321 | /* write the regular header */ |
| 322 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -201,11 +201,10 @@ | |
| 201 | int split; |
| 202 | |
| 203 | /* if this is a Pax Interchange header prepend "PaxHeader/" |
| 204 | ** so we can tell files apart from metadata */ |
| 205 | if( bHeader ){ |
| 206 | blob_reset(&tball.pax); |
| 207 | blob_appendf(&tball.pax, "PaxHeader/%*.*s", nName, nName, zName); |
| 208 | zName = blob_buffer(&tball.pax); |
| 209 | nName = blob_size(&tball.pax); |
| 210 | } |
| @@ -288,15 +287,17 @@ | |
| 287 | /* set mode and modification time */ |
| 288 | sqlite3_snprintf(8, (char*)&tball.aHdr[100], "%07o", iMode); |
| 289 | sqlite3_snprintf(12, (char*)&tball.aHdr[136], "%011o", mTime); |
| 290 | |
| 291 | /* see if we need to output a Pax Interchange Header */ |
| 292 | if( !is_iso646_name(zName, nName) |
| 293 | || !tar_split_path(zName, nName, (char*)tball.aHdr, (char*)&tball.aHdr[345]) |
| 294 | ){ |
| 295 | int lastPage; |
| 296 | /* add a file name for interoperability with older programs */ |
| 297 | approximate_split_path(zName, nName, (char*)tball.aHdr, |
| 298 | (char*)&tball.aHdr[345], 1); |
| 299 | |
| 300 | /* generate the Pax Interchange path header */ |
| 301 | blob_reset(&tball.pax); |
| 302 | add_pax_header("path", zName, nName); |
| 303 | |
| @@ -311,11 +312,12 @@ | |
| 312 | if( lastPage!=0 ){ |
| 313 | gzip_step(tball.zSpaces, 512 - lastPage); |
| 314 | } |
| 315 | |
| 316 | /* generate an approximate path for the regular header */ |
| 317 | approximate_split_path(zName, nName, (char*)tball.aHdr, |
| 318 | (char*)&tball.aHdr[345], 0); |
| 319 | } |
| 320 | /* set the size */ |
| 321 | sqlite3_snprintf(12, (char*)&tball.aHdr[124], "%011o", iSize); |
| 322 | |
| 323 | /* write the regular header */ |
| 324 |