Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Issue 11301032: Make linux_syscall_support.h compilable with -Wstrict-prototypes (Closed)

Created:
8 years, 1 month ago by Mark Seaborn
Modified:
8 years, 1 month ago
Reviewers:
Markus (顧孟勤)
CC:
chromium-reviews
Visibility:
Public.

Description

Make linux_syscall_support.h compilable with -Wstrict-prototypes Ensure that some functions are defined as taking no arguments rather than (in C) taking unspecified arguments. This prevents GCC from giving errors when compiling with "-Wstrict-prototypes -Werror". BUG=https://code.google.com/p/nativeclient/issues/detail?id=3114 TEST=run "gcc -Wstrict-prototypes lss/linux_syscall_support.h" Committed: https://code.google.com/p/linux-syscall-support/source/detail?r=17

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -6 lines) Patch
M lss/linux_syscall_support.h View 6 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Mark Seaborn
8 years, 1 month ago (2012-10-30 03:19:12 UTC) #1
Markus (顧孟勤)
8 years, 1 month ago (2012-10-30 03:53:02 UTC) #2
LGTM

On Monday, October 29, 2012,  <mseaborn@chromium.org> wrote:
> Reviewers: Markus (顧孟勤),
>
> Description:
> Make linux_syscall_support.h compilable with -Wstrict-prototypes
>
> Ensure that some functions are defined as taking no arguments rather
> than (in C) taking unspecified arguments.  This prevents GCC from
> giving errors when compiling with "-Wstrict-prototypes -Werror".
>
> BUG=https://code.google.com/p/nativeclient/issues/detail?id=3114
> TEST=run "gcc -Wstrict-prototypes lss/linux_syscall_support.h"
>
>
> Please review this at https://codereview.chromium.org/11301032/
>
> SVN Base: https://linux-syscall-support.googlecode.com/svn/trunk
>
> Affected files:
>   M lss/linux_syscall_support.h
>
>
> Index: lss/linux_syscall_support.h
> diff --git a/lss/linux_syscall_support.h b/lss/linux_syscall_support.h
> index
f1aad3aab9602c965a27c84e6d417d4c52626a56..fbeaf67ac3ec3a652d3b50fb9276b5814c3f2056
100644
> --- a/lss/linux_syscall_support.h
> +++ b/lss/linux_syscall_support.h
> @@ -1800,7 +1800,7 @@ struct kernel_statfs {
>            LSS_RETURN(type, __res)
>      #undef _syscall0
>      #define _syscall0(type,name)
     \
> -      type LSS_NAME(name)() {
      \
> +      type LSS_NAME(name)(void) {
      \
>          LSS_BODY(type, name);
      \
>        }
>      #undef _syscall1
> @@ -1969,7 +1969,7 @@ struct kernel_statfs {
>            LSS_RETURN(type, __res)
>      #undef _syscall0
>      #define _syscall0(type, name)
      \
> -      type LSS_NAME(name)() {
      \
> +      type LSS_NAME(name)(void) {
      \
>          LSS_BODY(type, name);
      \
>        }
>      #undef _syscall1
> @@ -2095,7 +2095,7 @@ struct kernel_statfs {
>            LSS_RETURN(type, __res)
>      #undef _syscall0
>      #define _syscall0(type, name)
      \
> -      type LSS_NAME(name)() {
      \
> +      type LSS_NAME(name)(void) {
      \
>          LSS_BODY(type, name);
      \
>        }
>      #undef _syscall1
> @@ -2245,7 +2245,7 @@ struct kernel_statfs {
>            LSS_RETURN(type, __v0, __r7)
>      #undef _syscall0
>      #define _syscall0(type, name)
      \
> -      type LSS_NAME(name)() {
      \
> +      type LSS_NAME(name)(void) {
      \
>          register unsigned long __r7 __asm__("$7");
     \
>          LSS_BODY(type, name, "=r");
      \
>        }
> @@ -3396,7 +3396,7 @@ struct kernel_statfs {
>      return LSS_NAME(execve)(path, argv, (const char *const *)environ);
>    }
>
> -  LSS_INLINE pid_t LSS_NAME(gettid)() {
> +  LSS_INLINE pid_t LSS_NAME(gettid)(void) {
>      pid_t tid = LSS_NAME(_gettid)();
>      if (tid != -1) {
>        return tid;
> @@ -3443,7 +3443,7 @@ struct kernel_statfs {
>      return LSS_NAME(kill)(LSS_NAME(getpid)(), sig);
>    }
>
> -  LSS_INLINE int LSS_NAME(setpgrp)() {
> +  LSS_INLINE int LSS_NAME(setpgrp)(void) {
>      return LSS_NAME(setpgid)(0, 0);
>    }
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698