Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #31374

Closed (moved)
Open
Opened Aug 08, 2019 by teor@teor

Appveyor: cast between incompatible function types in compat_time

The latest Appveyor compiler complains: {{{ ../src/lib/time/compat_time.c:522:25: error: cast between incompatible function types from 'FARPROC' to 'ULONGLONG (attribute((stdcall)) *)(void)' [-Werror=cast-function-type] 522 | GetTickCount64_fn = (GetTickCount64_fn_t) | ^ }}}

This issue is like #27465 (moved):

GetProcAddress() returns FARPROC, which is (long long int(*)()) on 64-bit Windows: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683212(v=vs.85).aspx

But GetTickCount64() is (long long unsigned int(*)()), on both 32-bit and 64-bit Windows: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-gettickcount64

So gcc 8 issues a spurious "incompatible function pointer" warning about the cast to GetTickCount64_fn_t.

Silence this warning by casting to a void function pointer, before the cast to GetTickCount64_fn_t.

Fixes bug NNNNN; bugfix on 0.2.9.1-alpha.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.2.9.x-final
Milestone
Tor: 0.2.9.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#31374