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
  • #24861

Closed (moved)
Open
Opened Jan 10, 2018 by Nick Mathewson@nickm🐙

Using %zu seems to break mingw :/

It looks like we found out why we weren't using %zu before:

17:55:39 In file included from src/or/or.h:72:0,
17:55:39                  from src/or/circuitlist.c:54:
17:55:39 src/or/circuitlist.c: In function 'circuits_handle_oom':
17:55:39 src/or/circuitlist.c:2407:26: error: unknown conversion type character 'z' in format [-Werror=format=]
17:55:39    log_notice(LD_GENERAL, "We're low on memory (cell queues total alloc: %zu,"
17:55:39                           ^
17:55:39 ./src/common/torlog.h:232:45: note: in definition of macro 'log_notice'
17:55:39    log_fn_(LOG_NOTICE, domain, __FUNCTION__, args, ##__VA_ARGS__)
17:55:39                                              ^~~~
17:55:39 src/or/circuitlist.c:2407:26: error: unknown conversion type character 'z' in format [-Werror=format=]
17:55:39    log_notice(LD_GENERAL, "We're low on memory (cell queues total alloc: %zu,"
17:55:39                           ^

(from https://jenkins.torproject.org/job/tor-ci-mingwcross-master/1577/ARCHITECTURE=amd64,SUITE=stretch/consoleFull)

In theory we can select a more c99 one with __USE_MINGW_ANSI_STDIO, but that would change our stdio everywhere. (Which is a little scary.)

We could also define a PRIsz macro that has the correct format for whatever compiler we are using. That might be a better choice.

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