<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re:  warning 604: Pointers are not assignment-compatible in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033677#M95044</link>
    <description>I didn't use both at the same time.  I saw that in the man pages.  I tried both methods to see if the same error occurred, and it did.  This indicated to me that I was doing something wrong, which now has been corrected.&lt;BR /&gt;&lt;BR /&gt;Thanks for watching out for me :-)</description>
    <pubDate>Tue, 13 Mar 2007 09:45:07 GMT</pubDate>
    <dc:creator>Joel Shank</dc:creator>
    <dc:date>2007-03-13T09:45:07Z</dc:date>
    <item>
      <title>warning 604: Pointers are not assignment-compatible</title>
      <link>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033672#M95039</link>
      <description>I am trying to write a C program to trap signals.  I have used signal(SIGNIT,proc); and sigaction(SIGINT, &amp;amp;new_action, NULL), setting new_action.sa_handler = proc;, where proc is the handler function defined as void proc(void);&lt;BR /&gt;&lt;BR /&gt;In both cases, the compiler issues this message.  Using the signal code, it flags the signal(SIGINT,proc) line, using the sigactions, it flags the new_action.sa_handler = proc; line.  The program works just fine (catches the signal), but I would like to get rid of the warning message and understand why I am getting it.&lt;BR /&gt;&lt;BR /&gt;Can anyone help?&lt;BR /&gt;&lt;BR /&gt;Thx,&lt;BR /&gt;jls</description>
      <pubDate>Tue, 13 Mar 2007 08:31:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033672#M95039</guid>
      <dc:creator>Joel Shank</dc:creator>
      <dc:date>2007-03-13T08:31:03Z</dc:date>
    </item>
    <item>
      <title>Re:  warning 604: Pointers are not assignment-compatible</title>
      <link>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033673#M95040</link>
      <description>Try something close to this. Note the the signal handler expects 1 arg rather than a void list.&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;SIGNAL.H&gt;&lt;BR /&gt;#include &lt;UNISTD.H&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;void Handler(int sig)&lt;BR /&gt;{&lt;BR /&gt;  (void) signal(sig,Handler); /* reset Handler */&lt;BR /&gt;  (void) printf("Received signal %d\n",sig);&lt;BR /&gt;  return;&lt;BR /&gt;} /* Handler */&lt;BR /&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;  int i = 0;&lt;BR /&gt;  void (*oldsig)(int sig) = SIG_DFL;&lt;BR /&gt;&lt;BR /&gt;  oldsig = signal(SIGINT,Handler);&lt;BR /&gt;  for (i = 1; i &amp;lt;= 10; ++i)&lt;BR /&gt;    {&lt;BR /&gt;      (void) printf("Press Ctrl-C to n'rupt  %d\n",i);&lt;BR /&gt;      (void) sleep(1);&lt;BR /&gt;    }&lt;BR /&gt;  (void) signal(SIGINT,oldsig);&lt;BR /&gt;  return(0);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--------------------------------------------&lt;/UNISTD.H&gt;&lt;/SIGNAL.H&gt;&lt;/STDLIB.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:21:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033673#M95040</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-03-13T09:21:20Z</dc:date>
    </item>
    <item>
      <title>Re:  warning 604: Pointers are not assignment-compatible</title>
      <link>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033674#M95041</link>
      <description>That did it!  It now works both ways without any warnings.&lt;BR /&gt;&lt;BR /&gt;Thanks much.&lt;BR /&gt;&lt;BR /&gt;jls</description>
      <pubDate>Tue, 13 Mar 2007 09:33:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033674#M95041</guid>
      <dc:creator>Joel Shank</dc:creator>
      <dc:date>2007-03-13T09:33:44Z</dc:date>
    </item>
    <item>
      <title>Re:  warning 604: Pointers are not assignment-compatible</title>
      <link>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033675#M95042</link>
      <description>Works!</description>
      <pubDate>Tue, 13 Mar 2007 09:34:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033675#M95042</guid>
      <dc:creator>Joel Shank</dc:creator>
      <dc:date>2007-03-13T09:34:38Z</dc:date>
    </item>
    <item>
      <title>Re:  warning 604: Pointers are not assignment-compatible</title>
      <link>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033676#M95043</link>
      <description>You don't need to use both signal() and sigaction(): use either one or the other. According to signal(2) man page, sigaction() is preferred for new applications.&lt;BR /&gt;&lt;BR /&gt;The type of your signal handler function is slightly wrong: it should be defined as void proc(int);&lt;BR /&gt;The integer will be a signal number. This is so that you can code one "master signal handler" function and register it to catch all signals you're interested in, and the handler function can tell which signal it is processing.&lt;BR /&gt;&lt;BR /&gt;This difference in types might be the cause of the warning.</description>
      <pubDate>Tue, 13 Mar 2007 09:39:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033676#M95043</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2007-03-13T09:39:19Z</dc:date>
    </item>
    <item>
      <title>Re:  warning 604: Pointers are not assignment-compatible</title>
      <link>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033677#M95044</link>
      <description>I didn't use both at the same time.  I saw that in the man pages.  I tried both methods to see if the same error occurred, and it did.  This indicated to me that I was doing something wrong, which now has been corrected.&lt;BR /&gt;&lt;BR /&gt;Thanks for watching out for me :-)</description>
      <pubDate>Tue, 13 Mar 2007 09:45:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/warning-604-pointers-are-not-assignment-compatible/m-p/5033677#M95044</guid>
      <dc:creator>Joel Shank</dc:creator>
      <dc:date>2007-03-13T09:45:07Z</dc:date>
    </item>
  </channel>
</rss>

