Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#14144 closed bug (fixed)

IFS.cpp: Remove RAND_MAX

Reported by: mt Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Add-Ons/Screen Savers Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


Remove RAND_MAX from IFS.cpp since it is not used in source code and pre-defined in stdlib.h .

/home/haiku/haiku/haiku/src/add-ons/screen_savers/ifs/IFS.cpp:36: error: "RAND_MAX" redefined [-Werror]
In file included from /home/haiku/haiku/haiku/generated-gcc8/build_packages/gcc_syslibs_devel-5.4.0_2016_06_04-7-x86_64/develop/headers/c++/bits/std_abs.h:38,
                 from /home/haiku/haiku/haiku/generated-gcc8/build_packages/gcc_syslibs_devel-5.4.0_2016_06_04-7-x86_64/develop/headers/c++/cmath:47,
                 from /home/haiku/haiku/haiku/generated-gcc8/build_packages/gcc_syslibs_devel-5.4.0_2016_06_04-7-x86_64/develop/headers/c++/math.h:36,
                 from /home/haiku/haiku/haiku/headers/os/interface/Rect.h:9,
                 from /home/haiku/haiku/haiku/headers/os/interface/Screen.h:11,
                 from /home/haiku/haiku/haiku/src/add-ons/screen_savers/ifs/IFS.h:16,
                 from /home/haiku/haiku/haiku/src/add-ons/screen_savers/ifs/IFS.cpp:16:
/home/haiku/haiku/haiku/headers/posix/stdlib.h:17: note: this is the location of the previous definition
 #define RAND_MAX      0x7fffffff
cc1plus: all warnings being treated as errors

Change History (2)

comment:1 by waddlesplash, 2 years ago

Resolution: fixed
Status: newclosed


comment:2 by waddlesplash, 2 years ago

BTW, for these kinds of changes I don't think you need to make a ticket, just pushing it to Gerrit is fine.

Note: See TracTickets for help on using tickets.