Ticket #204 (closed enhancement: fixed)

Opened 3 years ago

Last modified 8 months ago

Eliminate compiler warnings in Visual Studio compiler

Reported by: Pedro.vicente Owned by: Pedro.vicente
Priority: trivial Milestone: 4.3.0
Component: napi Version: trunk
Keywords: compiler warnings Cc:

Description (last modified by Freddie Akeroyd) (diff)

This is part of a possible port of the NeXus API for the Microsoft Visual Studio 2008 compiler, being discussed with Freddie Akeroyd (freddie.akeroyd@…) and Peter Peterson (petersonpf@…)

This ticket has the purpose of eliminating the following compiler warnings issued by VS2008, because of declared but not used variables in

src\napi5.c(99) : warning C4101: 'length' : unreferenced local variable src\napi5.c(778) : warning C4101: 'i' : unreferenced local variable src\napi5.c(1148) : warning C4101: 'length' : unreferenced local variable src\napi5.c(1183) : warning C4101: 'length' : unreferenced local variable src\napi5.c(1481) : warning C4101: 'size_id' : unreferenced local variable src\napi5.c(1481) : warning C4101: 'sign_id' : unreferenced local variable src\napi5.c(1604) : warning C4101: 'size_id' : unreferenced local variable src\napi5.c(1604) : warning C4101: 'sign_id' : unreferenced local variable src\napi5.c(1651) : warning C4101: 'size_id' : unreferenced local variable src\napi5.c(1651) : warning C4101: 'sign_id' : unreferenced local variable src\napi5.c(1687) : warning C4101: 'size_id' : unreferenced local variable src\napi5.c(1687) : warning C4101: 'sign_id' : unreferenced local variable src\napi5.c(1793) : warning C4101: 'size_id' : unreferenced local variable src\napi5.c(1793) : warning C4101: 'sign_id' : unreferenced local variable src\napi5.c(1933) : warning C4101: 'iRet' : unreferenced local variable src\napi5.c(1960) : warning C4101: 'u' : unreferenced local variable src\napi5.c(1961) : warning C4101: 'group_name' : unreferenced local variable src\napi5.c(1961) : warning C4101: 'class_name' : unreferenced local variable

Change History

comment:1 Changed 3 years ago by Pedro.vicente

  • Status changed from new to closed
  • Resolution set to fixed

(In [1378]) Fix: deleted the variables

Systems and compilers tested:

Windows 7, Microsoft Visual Studio 2008 Ubuntu Linux 9.10 (2.6.31-16 kernel) , gcc 4.4.1 Mac PPC G4 OS 10.5 , gcc 4.0.1

closes #204 and references #204

comment:2 Changed 3 years ago by Pedro.vicente

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:3 Changed 3 years ago by Pedro.vicente

  • Owner changed from Unassigned to Pedro.vicente
  • Status changed from reopened to new

comment:4 Changed 3 years ago by Pedro.vicente

  • Status changed from new to assigned

comment:5 Changed 3 years ago by Pedro.vicente

(In [1387]) Eliminated the following compiler warnings, due to declared but used variables

\src\nxdataset.c(181) : warning C4101: 'value' : unreferenced local variable \src\nxdataset.c(232) : warning C4101: 'length' : unreferenced local variable

\src\napi.c(234) : warning C4101: 'fapl' : unreferenced local variable \src\napi.c(235) : warning C4101: 'handle' : unreferenced local variable \src\napi.c(285) : warning C4101: 'hfile' : unreferenced local variable \src\napi.c(1213) : warning C4101: 'pathElem' : unreferenced local variable \src\napi.c(1242) : warning C4101: 'status' : unreferenced local variable \src\napi.c(1278) : warning C4101: 'status' : unreferenced local variable \src\napi.c(1408) : warning C4101: 'timeData' : unreferenced local variable

Solution: deleted the variables Systems and compilers tested: Windows 7, Microsoft Visual Studio 2008 Mac PPC G4 OS 10.5 , gcc 4.0.1

refs #204

comment:6 Changed 3 years ago by Pedro.vicente

(In [1389]) eliminated Visual Studio compiler warnings

1) unreferenced local variables

solution: deleted the variables

2) signed/unsigned mismatch in

\src\nxio.c(486) : warning C4018: '<' : signed/unsigned mismatch

solution: replaced int i with size_t i

refs #204

Systems and compilers tested:

Windows 7, Microsoft Visual Studio 2008 Ubuntu Linux 9.10, gcc 4.4.1 configure/Visual Studio Settings : enable HDF5 , HDF4 and NXXML

in napi4.c

\src\napi4.c(115) : warning C4101: 'status' : unreferenced local variable

\src\napi4.c(1327) : warning C4101: 'iVG' : unreferenced local variable

\src\napi4.c(1327) : warning C4101: 'iRet' : unreferenced local variable

\src\napi4.c(1359) : warning C4101: 'iVG' : unreferenced local variable

\src\napi4.c(1359) : warning C4101: 'iRet' : unreferenced local variable

in nxio.c

\src\nxio.c(332) : warning C4101: 'myType' : unreferenced local variable

\src\nxio.c(333) : warning C4101: 'i' : unreferenced local variable

\src\nxio.c(408) : warning C4101: 'tnode' : unreferenced local variable

\src\nxio.c(448) : warning C4101: 'i' : unreferenced local variable

\src\nxio.c(486) : warning C4018: '<' : signed/unsigned mismatch

in nxxml.c

\src\nxxml.c(348) : warning C4101: 'error' : unreferenced local variable

\src\nxxml.c(726) : warning C4101: 'type' : unreferenced local variable

\src\nxxml.c(726) : warning C4101: 'dim' : unreferenced local variable

\src\nxxml.c(726) : warning C4101: 'rank' : unreferenced local variable

\src\nxxml.c(825) : warning C4101: 'type' : unreferenced local variable

\src\nxxml.c(825) : warning C4101: 'dim' : unreferenced local variable

\src\nxxml.c(825) : warning C4101: 'rank' : unreferenced local variable

\src\nxxml.c(1300) : warning C4101: 'fValue' : unreferenced local variable

\src\nxxml.c(1299) : warning C4101: 'iValue' : unreferenced local variable

\src\nxxml.c(1670) : warning C4101: 'currentAtt' : unreferenced local variable

\src\nxxml.c(1746) : warning C4101: 'count' : unreferenced local variable

in nxbrowse.c

\applications\nxbrowse\nxbrowse.c(147) : warning C4101: 'length' : unreferenced local variable

\applications\nxbrowse\nxbrowse.c(147) : warning C4101: 'dataRank' : unreferenced local variable

\nexus\applications\nxbrowse\nxbrowse.c(148) : warning C4101: 'nxurl' : unreferenced local variable

\nexus\applications\nxbrowse\nxbrowse.c(147) : warning C4101: 'dataDimensions' : unreferenced local variable

comment:7 Changed 8 months ago by Freddie Akeroyd

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Description modified (diff)
Note: See TracTickets for help on using tickets.