Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 328
    • Issues 328
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 31
    • Merge requests 31
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #26282
Closed
Open
Issue created Jun 03, 2018 by rl1987@rl1987

Smartlist index implicitly converted to int

When building with DEBUG_SMARTLIST:

src/common/util.c:4816:45: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
    const char *s = smartlist_get(env_vars, i);
                    ~~~~~~~~~~~~~           ^
src/common/util.c:4846:54: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
      const char *s = smartlist_get(env_vars_sorted, i);
                      ~~~~~~~~~~~~~                  ^
2 warnings generated.
src/common/util.c:4816:45: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
    const char *s = smartlist_get(env_vars, i);
                    ~~~~~~~~~~~~~           ^
src/common/util.c:4846:54: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
      const char *s = smartlist_get(env_vars_sorted, i);
                      ~~~~~~~~~~~~~                  ^
2 warnings generated.
src/or/control.c:4627:43: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
    const char *arg = smartlist_get(args, i);
                      ~~~~~~~~~~~~~       ^
1 warning generated.
src/or/geoip.c:153:57: warning: implicit conversion loses integer precision: 'intptr_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    geoip_country_t *c = smartlist_get(geoip_countries, idx);
                         ~~~~~~~~~~~~~                  ^~~
1 warning generated.
src/or/control.c:4627:43: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
    const char *arg = smartlist_get(args, i);
                      ~~~~~~~~~~~~~       ^
1 warning generated.
src/or/geoip.c:153:57: warning: implicit conversion loses integer precision: 'intptr_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    geoip_country_t *c = smartlist_get(geoip_countries, idx);
                         ~~~~~~~~~~~~~                  ^~~
1 warning generated.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking