Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #919 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

Warnings in TempFile, ZipFolder and Zip on linux

Reported by: larsivi Assigned to: DRK
Priority: major Milestone: 0.99.6
Component: Tango Version: 0.99.4 Frank
Keywords: warnings linux dmd Cc:

Description

TempFile:

warning - tango/io/TempFile.d(550): Error: implicit conversion of expression (offset) of type long to int can cause loss of data

tango/io/archive/Zip:

warning - tango/io/archive/Zip.d(132): Error: implicit conversion of expression (file_name.length) of type uint to ushort can cause loss of data
warning - tango/io/archive/Zip.d(133): Error: implicit conversion of expression ((this.extra_field).length) of type uint to ushort can cause loss of data
warning - tango/io/archive/Zip.d(317): Error: implicit conversion of expression (file_name.length) of type uint to ushort can cause loss of data
warning - tango/io/archive/Zip.d(318): Error: implicit conversion of expression ((this.extra_field).length) of type uint to ushort can cause loss of data
warning - tango/io/archive/Zip.d(319): Error: implicit conversion of expression (file_comment.length) of type uint to ushort can cause loss of data
warning - tango/io/archive/Zip.d(428): Error: implicit conversion of expression (file_comment.length) of type uint to ushort can cause loss of data
warning - tango/io/archive/Zip.d(488): function tango.io.archive.Zip.toMethod no return at end of function
warning - tango/io/archive/Zip.d(498): function tango.io.archive.Zip.fromMethod no return at end of function
warning - tango/io/archive/Zip.d(656): Error: switch statement has no default
warning - tango/io/archive/Zip.d(656): Error: statement is not reachable
warning - tango/io/archive/Zip.d(654): function tango.io.archive.Zip.ZipBlockReader.more no return at end of function
warning - tango/io/archive/Zip.d(798): Error: implicit conversion of expression (4L + used) of type long to uint can cause loss of data
warning - tango/io/archive/Zip.d(850): Error: implicit conversion of expression (chunk_len) of type long to uint can cause loss of data
warning - tango/io/archive/Zip.d(862): Error: implicit conversion of expression (chunk_len - 18L) of type long to uint can cause loss of data

tango/io/vfs/ZipFolder:

warning - tango/io/vfs/ZipFolder.d(115): Error: implicit conversion of expression (((*(&(this.file) + 4)).length)()) of type long to ulong can cause loss of data
warning - tango/io/vfs/ZipFolder.d(216): Error: switch statement has no default
warning - tango/io/vfs/ZipFolder.d(216): Error: statement is not reachable
warning - tango/io/vfs/ZipFolder.d(687): function tango.io.vfs.ZipFolder.ZipSubFolder.folder no return at end of function
warning - tango/io/vfs/ZipFolder.d(982): function tango.io.vfs.ZipFolder.ZipFile.size no return at end of function
warning - tango/io/vfs/ZipFolder.d(1130): function tango.io.vfs.ZipFolder.ZipFile.input no return at end of function
warning - tango/io/vfs/ZipFolder.d(1294): function tango.io.vfs.ZipFolder.ZipSubFolderEntry.open no return at end of function
tango/io/vfs/ZipFolder.d(1475): function tango.io.vfs.ZipFolder.ZipSubFolderGroup.catalog (char[]) does not match parameter types (int delegate(VfsFilterInfo * info))
tango/io/vfs/ZipFolder.d(1476): Error: cannot implicitly convert expression (__dgliteral1) of type int delegate(VfsFilterInfo * info) to bool delegate(VfsFilterInfo *)

The last error looks like an error and not warning, but only comes up with -w enable.d - maybe W only forgot the warning: prefix ...

Change History

(follow-up: ↓ 2 ) 02/16/08 11:38:42 changed by DRK

(In [3200]) This should clean up the warnings from core.Variant, io.archive.Zip, io.TempFile? and io.vfs.ZipFolder?. However, there are still two warnings in io.archive.Zip which do not give file or line numbers. I'll keep trying to track them down. Refs #919.

(in reply to: ↑ 1 ) 02/23/08 13:03:27 changed by afb

Replying to DRK:

However, there are still two warnings in io.archive.Zip which do not give file or line numbers. I'll keep trying to track them down.

I see these in tango/io/archive/Zip.d on Mac OS X with GDC).

warning - Error: statement is not reachable
warning - Error: statement is not reachable

03/04/08 09:18:42 changed by Jim Panic

  • milestone changed from 0.99.5 to 0.99.6.

03/21/08 11:45:39 changed by larsivi

  • status changed from new to closed.
  • resolution set to fixed.

All are now fixed (using DMD 1.028)