Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #26282

Closed (moved)
(moved)
Open
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