Menu

#168 trivial - malloc warning using gcc 8 on linux

2.0
closed
nobody
None
2019-11-03
2019-10-27
Ian Jeffray
No

backend/reedsol.c: In function 'rs_init_gf':
backend/reedsol.c:81:20: warning: argument 1 value '4294967292' exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]
alog = (int *) malloc(sizeof (int) * logmod);

Related

Tickets: #168

Discussion

  • Robin Stuart

    Robin Stuart - 2019-10-30

    Hi Ian,

    I have added a small patch which should overcome this warning, although in practice rs_init_gf is never called with a value which would make this a problem. When you get the opportunity I would appreciate it if you could let me know if this satisfies gcc on your system.

    Thanks,

    Robin.

     
    • Ian Jeffray

      Ian Jeffray - 2019-11-01

      Hi Robin,

      This does indeed fix the warning with GCC 8.2

      Thanks,

      Ian

      From: Robin Stuart g3rrk@users.sourceforge.net
      Sent: 30 October 2019 07:53
      To: [zint:tickets] 168@tickets.zint.p.re.sourceforge.net
      Subject: [zint:tickets] #168 trivial - malloc warning using gcc 8 on linux

      Hi Ian,

      I have added a small patch which should overcome this warning, although in
      practice rs_init_gf is never called with a value which would make this a
      problem. When you get the opportunity I would appreciate it if you could let
      me know if this satisfies gcc on your system.

      Thanks,

      Robin.


      [tickets:#168] https://sourceforge.net/p/zint/tickets/168/ trivial -
      malloc warning using gcc 8 on linux

      Status: open
      Milestone: 2.0
      Created: Sun Oct 27, 2019 05:04 PM UTC by Ian Jeffray
      Last Updated: Sun Oct 27, 2019 05:04 PM UTC
      Owner: nobody

      backend/reedsol.c: In function 'rs_init_gf':
      backend/reedsol.c:81:20: warning: argument 1 value '4294967292' exceeds
      maximum object size 2147483647 [-Walloc-size-larger-than=]
      alog = (int *) malloc(sizeof (int) * logmod);


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/zint/tickets/168/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Tickets: #168

  • Robin Stuart

    Robin Stuart - 2019-11-03
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB